caldate — calendar dates
#include <caldate.h> unsigned int \fBcaldate_fmt\fP(\fIs\fR,&\fIcd\fR); unsigned int \fBcaldate_scan\fP(\fIs\fR,&\fIcd\fR); struct caldate \fIcd\fR; char *\fIs\fR;
cd
in ISO style (yyyy-mm-dd)
into the character buffer
s,
without a terminating NUL.
It returns the number of characters printed.
s
may be zero;
then
caldate_fmt
returns the number of characters that would have been printed.
caldate_scan
reads a calendar date in ISO style
from the beginning of the character buffer
s
and puts it into
cd.
It returns the number of characters read.
If
s
does not start with an ISO-style date,
caldate_scan
returns 0.