Home
last modified time | relevance | path

Searched refs:leapyear (Results 1 – 5 of 5) sorted by relevance

/external/rust/crates/chrono/src/sys/
Dstub.rs14 let leapyear = |year| -> bool { year % 4 == 0 && (year % 100 != 0 || year % 400 == 0) }; in time_to_tm() localVariable
31 let yearsize = if leapyear(year) { 366 } else { 365 }; in time_to_tm()
42 while dayno >= YTAB[if leapyear(year) { 1 } else { 0 }][mon] { in time_to_tm()
43 dayno -= YTAB[if leapyear(year) { 1 } else { 0 }][mon]; in time_to_tm()
/external/icu/icu4c/source/tools/tzcode/
Dlocaltime.c834 register int leapyear; in transtime() local
840 leapyear = isleap(year); in transtime()
852 if (leapyear && rulep->r_day >= 60) in transtime()
893 mon_lengths[leapyear][rulep->r_mon - 1]) in transtime()
903 value += mon_lengths[leapyear][i] * SECSPERDAY; in transtime()
/external/python/cpython3/Lib/
Ddatetime.py135 leapyear = n1 == 3 and (n4 != 24 or n100 == 3)
136 assert leapyear == _is_leap(year)
138 preceding = _DAYS_BEFORE_MONTH[month] + (month > 2 and leapyear)
141 preceding -= _DAYS_IN_MONTH[month] + (month == 2 and leapyear)
/external/python/cpython2/Modules/
Ddatetimemodule.c246 int n, n1, n4, n100, n400, leapyear, preceding; in ord_to_ymd() local
310 leapyear = n1 == 3 && (n4 != 24 || n100 == 3); in ord_to_ymd()
311 assert(leapyear == is_leap(*year)); in ord_to_ymd()
313 preceding = (_days_before_month[*month] + (*month > 2 && leapyear)); in ord_to_ymd()
/external/python/cpython3/Modules/
D_datetimemodule.c285 int n, n1, n4, n100, n400, leapyear, preceding; in ord_to_ymd() local
349 leapyear = n1 == 3 && (n4 != 24 || n100 == 3); in ord_to_ymd()
350 assert(leapyear == is_leap(*year)); in ord_to_ymd()
352 preceding = (_days_before_month[*month] + (*month > 2 && leapyear)); in ord_to_ymd()