Mistake on this page?
Report an issue in GitHub or email us
Functions
mktime functions

Functions

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. More...
 

Detailed Description

Function Documentation

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.

Parameters
yearThe year to test it shall be in the range [70:206]. Year 0 is translated into year 1900 CE.
leap_year_supportuse RTC_FULL_LEAP_YEAR_SUPPORT if RTC device is able to correctly detect all leap years in range [70:206] otherwise use RTC_4_YEAR_LEAP_YEAR_SUPPORT.
Returns
true if the year in input is a leap year and false otherwise.
Note
For use by the HAL only
Year 2100 is treated differently for devices with full leap year support and devices with partial leap year support. Devices with partial leap year support treats 2100 as a leap year.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.