Lines Matching full:year
7 * Traditional implementation of leap year evaluation.
9 static bool is_leap(long year) in is_leap() argument
11 return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0); in is_leap()
17 static int last_day_of_month(long year, int month) in last_day_of_month() argument
20 return 28 + is_leap(year); in last_day_of_month()
29 static void advance_date(long *year, int *month, int *mday, int *yday) in advance_date() argument
31 if (*mday != last_day_of_month(*year, *month)) { in advance_date()
46 ++*year; in advance_date()
61 long year = 1970 - 80000; in time64_to_tm_test_date_range() local
77 year, month, mdday, yday, days in time64_to_tm_test_date_range()
79 KUNIT_ASSERT_EQ_MSG(test, year - 1900, result.tm_year, FAIL_MSG); in time64_to_tm_test_date_range()
84 advance_date(&year, &month, &mdday, &yday); in time64_to_tm_test_date_range()