November 2018
Intermediate to advanced
460 pages
14h 1m
English
The internal representation of dates in the Date object is the number of days from the start of the current epoch:
julia> d1 = Date("2018-08-15")julia> dump(d1)Date instant: Dates.UTInstant{Day} periods: Day value: Int64 736921
The day that corresponds to the integer 1 is January 1st, 1 A.D.:
julia> d1 = Date("2018-08-15")2018-08-15julia> d1 - Day(d1.instant.periods.value)+Day(1)0001-01-01
The internal representation of time in the DateTime objects is Millisecond-based:
julia> dt = DateTime("2018-08-15T18:22:55.123")julia> dump(dt)DateTime instant: Dates.UTInstant{Millisecond} periods: Millisecond value: Int64 63670040575123
Similarly, the milliseconds are counted from the start of the current epoch:
julia> dt = DateTime ...Read now
Unlock full access