1libtai is a library for storing and manipulating dates and times.
2
3libtai supports two time scales: (1) TAI64, covering a few hundred
4billion years with 1-second precision; (2) TAI64NA, covering the same
5period with 1-attosecond precision. Both scales are defined in terms of
6TAI, the current international real time standard.
7
8libtai provides an internal format for TAI64, struct tai, designed for
9fast time manipulations. The tai_pack() and tai_unpack() routines
10convert between struct tai and a portable 8-byte TAI64 storage format.
11libtai provides similar internal and external formats for TAI64NA.
12
13libtai provides struct caldate to store dates in year-month-day form. It
14can convert struct caldate, under the Gregorian calendar, to a modified
15Julian day number for easy date arithmetic.
16
17libtai provides struct caltime to store calendar dates and times along
18with UTC offsets. It can convert from struct tai to struct caltime in
19UTC, accounting for leap seconds, for accurate date and time display. It
20can also convert back from struct caltime to struct tai for user input.
21Its overall UTC-to-TAI conversion speed is 100x better than the usual
22UNIX mktime() implementation.
23
24This version of libtai requires a UNIX system with gettimeofday(). It
25will be easy to port to other operating systems with compilers
26supporting 64-bit arithmetic.
27
28The libtai source code is in the public domain.
29