is_leap_year
} while (!is_leap_year(alarm->time.tm_year + 1900) &&
is_leap_year = year_of_century != 0 ?
day_of_year - 306 : day_of_year + 31 + 28 + is_leap_year;
return rtc_days_in_month[month] + (is_leap_year(year) && month == 1);
return rtc_ydays[is_leap_year(year)][month] + day - 1;
bool is_Jan_or_Feb, is_leap_year;
if (is_leap_year(year + AC100_YEAR_OFF + 1900))
if (!is_leap_year(real_yrs + 1900) && mon < 3) {
(SEC_PER_DAY * (365 + is_leap_year(alm->time.tm_year))))
return 365 + (is_leap_year(year) ? 1 : 0);
if (is_leap_year(rtc_tm->tm_year + SUN6I_YEAR_MIN))
if (is_leap_year(year))
is_leap_year = year_of_century ? !(year_of_century % 4) : !(century % 4);
day_of_year += is_Jan_or_Feb ? -306 : 31 + 28 + is_leap_year;
bool is_Jan_or_Feb, is_leap_year;
if (is_leap_year(year)) {