/** * Explicit conversion to @c days_date. * * @Returns a @c days_date representing the same date. */ friend BOOST_FORCEINLINE days_date to_days_date(ydoy_date ydoy) { year::rep by = ydoy.y_ + 32799; return days_date(days(days_before_year(by) + ydoy.doy_ - 1)); //return days_date(chrono::year(y_), day_of_year(doy_)); }
/* year, month, day -> ordinal, considering 01-Jan-0001 as day 1. */ static int ymd_to_ord(int year, int month, int day) { return days_before_year(year) + days_before_month(year, month) + day; }