Hi Henrik,
I was wondering why the conversion to DateString
is required. Here is why
allDays[[1]] // InputForm
(* DateObject[{2019, 1, 1, 0, 0, 0.}, "Instant", "Gregorian", -5.] *)
data["Dates"][[1]] // InputForm
(* DateObject[{2019, 1, 1, 0, 0, 0}, "Instant", "Gregorian", -5.] *)
The DateObject
generated by DateRange
has Real
seconds 0.
while the DateObject
in WeatherData
has Integer
seconds 0
. Even though the date specifications passed to DateRange
have Integer
seconds. This seems like an oversight or bug in the implementation of DateRange
. Thanks for revealing this, I will keep it in mind when dealing with DateRange
.