17 using Newtonsoft.Json;
30 [JsonProperty(PropertyName =
"date")]
31 public DateTime
Date {
get;
set; }
36 [JsonProperty(PropertyName =
"status")]
37 public string Status {
get;
set; } =
string.Empty;
42 [JsonProperty(PropertyName =
"premarket")]
48 [JsonProperty(PropertyName =
"open")]
54 [JsonProperty(PropertyName =
"postmarket")]
72 [JsonProperty(PropertyName =
"start")]
73 public DateTime
Start {
get;
set; }
78 [JsonProperty(PropertyName =
"end")]
79 public DateTime
End {
get;
set; }
87 public MarketHours(DateTime referenceDate,
double defaultStart,
double defaultEnd)
89 Start = referenceDate.Date.AddHours(defaultStart);
90 End = referenceDate.Date.AddHours(defaultEnd);