/* Checks if the supplied year is a leap year or not.  */
bool rtcIsLeapYear(int32_t year)
/* Checks if the supplied year is a leap year or not.  */
bool rtcIsLeapYear(int32_t year)
{
    if (year >= 1900)
    {
        year -= 1900;
    }
    if (((year % 400) == 100) || (((year % 4) == 0) && ((year % 100) != 0)))
    {
        return RTC_LEAP_YEAR;
    }
    return RTC_NON_LEAP_YEAR;
}