This package expects Julia v1.6.3 or higher
pkg> up
pkg> add TimeZones
pkg> add CompoundPeriods TimesDates
using TimesDates, CompoundPeriods, TimeZones, Dates
This package provides TimeDate
to hold the date and time of day given in nanoseconds (or more coarsely). And providesTimeDateZone
to holds the the date and time of day in nanoseconds with a timezone. This work relies heavily on Dates
and TimeZones
; most of the attention to detail plays through.
Dates
has a Time
type that has nanosecond resolution; it is not well supported, even within Dates
. This Time
type recognizes strings only if they are limited to millisecond resolution. Only millisecond resolved times are relevant to DateTime
s. While at present limited by this millisecond barrier, TimeZones
is a laudable package with active support. I expect an eventual melding of what's best.
Here, the inner dynamics rely upon the Period
types (Year
.. Day
, Hour
, .., Nanosecond
) and CompoundPeriod
all provided by Dates
. We distinguish slowtime, which is millisecond resolved, from a nanosecond resolved fasttime.
The general approach is separate the date, slowtime, fasttime, and timezone (if appropriate), then use the date, slowtime and timezone (if appropriate) to obtain a coarse result using the facilities provided by the Date
and TimeZones
packages. We refine the coarse result by adding or subtracting the fasttime, as appropriate.
This work is built atop Dates
and TimeZones
.
While both are collaborative works, a few people deserve mention:
Dates
: Jacob Quinn and Stefan KarpinskiTimeZones
: Curtis Vogt- early work on timezones: Avik Sengupta