mbed_mktime.h

37 /* Time range across the whole 32-bit range should be supported which means that years in range 1970 - 2106 can be

39 * a) RTCs which handles all leap years in the mentioned year range correctly. Leap year is determined by checking if

41 * b) RTCs which handles leap years correctly up to 2100. The RTC does a simple bit comparison to see if the two

43 * incorrectly as a leap year, so the last valid point in time will be 28.02.2100 23:59:59 and next day will be

56 * to correctly detect all leap years in range [70:206] otherwise use RTC_4_YEAR_LEAP_YEAR_SUPPORT.

61 * @note Year 2100 is treated differently for devices with full leap year support and devices with

84 * to correctly detect all leap years in range [70:206] otherwise use RTC_4_YEAR_LEAP_YEAR_SUPPORT.

94 bool _rtc_maketime(const struct tm *time, time_t *seconds, rtc_leap_year_support_t leap_year_support);

116 * to correctly detect all leap years in range [70:206] otherwise use RTC_4_YEAR_LEAP_YEAR_SUPPORT.

122 bool _rtc_localtime(time_t timestamp, struct tm *time_info, rtc_leap_year_support_t leap_year_support);

bool _rtc_is_leap_year(int year, rtc_leap_year_support_t leap_year_support)

Compute if a year is a leap year or not.