3 * - By John Hodge (thePowersGang)
6 * - Shared User/Kernel time conversion code
8 #ifndef _LIBC_TIMECONV_H_
9 #define _LIBC_TIMECONV_H_
14 extern int64_t seconds_since_y2k(int years_since, int mon, int day, int h, int m, int s);
17 * \return Number of days since Y2K
19 * Extracts the time of day from the timestamp, (possibly taking into account leap seconds)
21 extern int64_t get_days_since_y2k(int64_t ts, int *h, int *m, int *s);
24 * \param days Number of days since Y2K
25 * \return Number of years since Y2K
27 * Converts a count of days since Y2K, and returns the number of years. Extracting the day of
28 * year, and if that year is a leap year.
30 extern int64_t get_years_since_y2k(int64_t days, bool *is_leap, int *doy);
34 * Gets the month and day of month from a day of year and leap year status
36 extern void get_month_day(int doy, bool is_ly, int *mon, int *day);