Lines Matching defs:year
17 // Returns number of years from (1, year).
18 static constexpr int64_t get_num_of_leap_years_before(int64_t year) {
19 return (year / 4) - (year / 100) + (year / 400);
22 // Returns True if year is a leap year.
23 static constexpr bool is_leap_year(const int64_t year) {
24 return (((year) % 4) == 0 && (((year) % 100) != 0 || ((year) % 400) == 0));
55 // Years are ints. A 32-bit year will fit into a 64-bit time_t.
56 // A 64-bit year will not.
78 // Add one day if it is a leap year and the month is after February.
82 // Calculate total numbers of days based on the year.
92 // Calculate number of leap years until 0th year.
96 total_days -= 1; // Subtract 1 for 0th year.
97 // Calculate number of leap years until -1 year
112 // Update the tm structure's year, month, day, etc. from seconds.