I’d like to extend the
DateTime constructor to accept
DateTime(x::Date, y::Time). Can anyone think of anything more sensible than the following?
DateTime(x::Date, y::Time) = DateTime(x) + Millisecond(Int(round(Dates.value(y) / 1000000)))
I just convert the nanosecond from epoch to milliseconds from epoch and then add it to a
DateTime that starts at the beginning of the day.
I’m not 100% convinced by
ceil would be more appropriate?
Would this be a sensible method to include in
Dates? I would have thought it quite a common operation…