Lines Matching defs:year
7 * Traditional implementation of leap year evaluation, but note that long
8 * is a signed type and the tests do cover negative year values. So this
11 static bool is_leap(long year)
13 return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
19 static int last_day_of_month(long year, int month)
22 return 28 + is_leap(year);
31 static void advance_date(long *year, int *month, int *mday, int *yday)
33 if (*mday != last_day_of_month(*year, *month)) {
48 ++*year;
63 long year = 1970 - 80000;
79 year, month, mdday, yday, days
81 KUNIT_ASSERT_EQ_MSG(test, year - 1900, result.tm_year, FAIL_MSG);
86 advance_date(&year, &month, &mdday, &yday);