caltime 3 user commands djbwares
caltime_tai convert calendar dates and times

    #include <caltime.h>

    #include <tai.h>

    void \fBcaltime_tai\fP(&\fIct\fR,&\fIt\fR);

    void \fBcaltime_utc\fP(&\fIct\fR,&\fIt\fR,&\fIweekday\fR,&\fIyearday\fR);

    struct caltime \fIct\fR;

    struct tai \fIt\fR;

    int *\fIweekday\fR;

    int *\fIyearday\fR;

## Description

`caltime_tai` reads a date, time, and UTC offset from ct. It puts the corresponding TAI64 label into t. `caltime_utc` reads a TAI64 label from t. It puts the corresponding date and time into ct, with UTC offset 0. `caltime_utc` fills in weekday and yearday the same way as `caldate_frommjd`.

## Limitations

The sequence of TAI64 labels has been determined for the next few hundred billion years. The same is not true, however, for calendar dates and times. New leap seconds are added every year or two, as discussed in leapsecs 3; and the Gregorian calendar will change in a few thousand years, as discussed in caldate_mjd 3. This means that `caltime_tai` and `caltime_utc` are not useful for dates far in the future.

## See also

caldate_mjd 3
caltime 3
tai 3
leapsecs 3

## Author

Original code and documentation by Daniel J. Bernstein. Converted to DocBook XML by Jonathan de Boyne Pollard.