2 * ymd2yd - compute the date in the year from y/m/d
4 * A thin wrapper around a more general calendar function.
8 #include "ntp_stdlib.h"
9 #include "ntp_calendar.h"
18 * convert y/m/d to elapsed calendar units, convert that to
19 * elapsed days since the start of the given year and convert
20 * back to unity-based day in year.
22 * This does no further error checking, since the underlying
23 * function is assumed to work out how to handle the data.
25 return ntpcal_edate_to_yeardays(y-1, m-1, d-1) + 1;