17 using System.Collections.Generic;
18 using Newtonsoft.Json;
25 [JsonObject(MemberSerialization.OptIn)]
31 [JsonProperty(
"start")]
32 public TimeSpan
Start {
get;
private set; }
38 public TimeSpan
End {
get;
private set; }
43 [JsonProperty(
"state")]
84 TimeSpan extendedMarketOpen,
87 TimeSpan extendedMarketClose
91 if (marketOpen < extendedMarketOpen)
95 if (marketClose < marketOpen)
99 if (extendedMarketClose < marketClose)
104 var segments =
new List<MarketHoursSegment>();
106 if (extendedMarketOpen != marketOpen)
111 if (marketOpen != TimeSpan.Zero || marketClose != TimeSpan.Zero)
116 if (marketClose != extendedMarketClose)
121 return segments.ToArray();
142 return Start < end && End > start;