Home
last modified time | relevance | path

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

/external/libcxx/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.members/
Dis_leap.pass.cpp28 ASSERT_NOEXCEPT( year(1).is_leap()); in main()
29 ASSERT_SAME_TYPE(bool, decltype(year(1).is_leap())); in main()
31 static_assert(!year{1}.is_leap(), ""); in main()
32 static_assert(!year{2}.is_leap(), ""); in main()
33 static_assert(!year{3}.is_leap(), ""); in main()
34 static_assert( year{4}.is_leap(), ""); in main()
36 assert( year{-2000}.is_leap()); in main()
37 assert( year{ -400}.is_leap()); in main()
38 assert(!year{ -300}.is_leap()); in main()
39 assert(!year{ -200}.is_leap()); in main()
[all …]
/external/v8/src/
Ddate.cc124 bool is_leap = (!yd1 || yd2) && !yd3; in YearMonthDayFromDays() local
127 DCHECK(is_leap || (days >= 0)); in YearMonthDayFromDays()
128 DCHECK((days < 365) || (is_leap && (days < 366))); in YearMonthDayFromDays()
129 DCHECK(is_leap == ((*year % 4 == 0) && (*year % 100 || (*year % 400 == 0)))); in YearMonthDayFromDays()
130 DCHECK(is_leap || ((DaysFromYearMonth(*year, 0) + days) == save_days)); in YearMonthDayFromDays()
131 DCHECK(!is_leap || ((DaysFromYearMonth(*year, 0) + days + 1) == save_days)); in YearMonthDayFromDays()
133 days += is_leap; in YearMonthDayFromDays()
136 if (days >= 31 + 28 + BoolToInt(is_leap)) { in YearMonthDayFromDays()
137 days -= 31 + 28 + BoolToInt(is_leap); in YearMonthDayFromDays()
/external/python/cpython2/Modules/
Ddatetimemodule.c177 is_leap(int year) in is_leap() function
194 if (month == 2 && is_leap(year)) in days_in_month()
209 if (month > 2 && is_leap(year)) in days_before_month()
311 assert(leapyear == is_leap(*year)); in ord_to_ymd()
/external/python/cpython3/Modules/
D_datetimemodule.c205 is_leap(int year) in is_leap() function
222 if (month == 2 && is_leap(year)) in days_in_month()
237 if (month > 2 && is_leap(year)) in days_before_month()
333 assert(leapyear == is_leap(*year)); in ord_to_ymd()
/external/libcxx/include/
Dchrono1762 …inline constexpr bool is_leap() const noexcept { return __y % 4 == 0 && (__y % 100 != 0 || __y % 4…
2440 return month() != February || !__y.is_leap() ?