| /openbsd-src/gnu/llvm/libcxx/include/__chrono/ |
| H A D | year.h | 32 class year { 36 _LIBCPP_HIDE_FROM_ABI year() = default; 37 …_LIBCPP_HIDE_FROM_ABI explicit inline constexpr year(int __val) noexcept : __y_(static_cast<short>… in year() function 39 _LIBCPP_HIDE_FROM_ABI inline constexpr year& operator++() noexcept { ++__y_; return *this; } 40 …_LIBCPP_HIDE_FROM_ABI inline constexpr year operator++(int) noexcept { year __tmp = *this; ++(*th… 41 _LIBCPP_HIDE_FROM_ABI inline constexpr year& operator--() noexcept { --__y_; return *this; } 42 …_LIBCPP_HIDE_FROM_ABI inline constexpr year operator--(int) noexcept { year __tmp = *this; --(*th… 43 _LIBCPP_HIDE_FROM_ABI constexpr year& operator+=(const years& __dy) noexcept; 44 _LIBCPP_HIDE_FROM_ABI constexpr year& operator-=(const years& __dy) noexcept; 45 _LIBCPP_HIDE_FROM_ABI inline constexpr year operator+() const noexcept { return *this; } [all …]
|
| H A D | year_month_day.h | 41 chrono::year __y_; 47 … const chrono::year& __yval, const chrono::month& __mval, const chrono::day& __dval) noexcept in year_month_day() 60 _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y_; } in year() function 88 … return year_month_day{chrono::year{__yr + (__mth <= 2)}, chrono::month{__mth}, chrono::day{__dy}}; in __from_days() 111 { return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month() && __lhs.day() == __rhs.day… 115 if (auto __c = __lhs.year() <=> __rhs.year(); __c != 0) 124 { return year_month_day{__lhs.year(), __lhs.month(), __rhs}; } 131 year_month_day operator/(const year& __lhs, const month_day& __rhs) noexcept 136 { return year(__lhs) / __rhs; } 139 year_month_day operator/(const month_day& __lhs, const year& __rhs) noexcept [all …]
|
| H A D | year_month.h | 31 chrono::year __y_; 35 …_LIBCPP_HIDE_FROM_ABI constexpr year_month(const chrono::year& __yval, const chrono::month& __mval… in year_month() 37 _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y_; } in year() function 47 year_month operator/(const year& __y, const month& __m) noexcept { return year_month{__y, __m}; } 50 year_month operator/(const year& __y, int __m) noexcept { return year_month{__y, month(__m)}; } 54 { return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month(); } 57 if (auto __c = __lhs.year() <=> __rhs.year(); __c != 0) 68 return (__lhs.year() + years(__dy)) / month(static_cast<unsigned>(__dmi)); 77 { return (__lhs.year() + __rhs) / __lhs.month(); } 85 { return (__lhs.year() - __rhs.year()) + months(static_cast<unsigned>(__lhs.month()) - static_cast<…
|
| H A D | year_month_weekday.h | 38 chrono::year __y_; 43 …_LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday(const chrono::year& __yval, const chrono::month… in year_month_weekday() 55 …_LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { … in year() function 85 return year_month_weekday{__ymd.year(), __ymd.month(), in __from_days() 99 { return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month() && __lhs.weekday_indexed() … 107 { return year_month_weekday{__lhs.year(), __lhs.month(), __rhs}; } 110 year_month_weekday operator/(const year& __lhs, const month_weekday& __rhs) noexcept 115 { return year(__lhs) / __rhs; } 118 year_month_weekday operator/(const month_weekday& __lhs, const year& __rhs) noexcept 123 { return year(__rhs) / __lhs; } [all …]
|
| /openbsd-src/gnu/usr.bin/perl/cpan/Time-Local/t/ |
| H A D | Local.t | 105 my ( $year, $mon, $mday, $hour, $min, $sec ) = @{$vals}; 109 next if $^O eq 'vos' && $year == 1970; 112 my $y = $year; 125 year => $lt[5], 133 year => $year - 1900, 140 my $y = $year; 153 year => $gt[5], 161 year => $year [all...] |
| /openbsd-src/gnu/usr.bin/perl/ |
| H A D | time64.c | 145 static int S_is_exception_century(Year year) in S_is_exception_century() argument 147 const int is_exception = ((year % 100 == 0) && !(year % 400 == 0)); in S_is_exception_century() 159 Year year = 70; in S_timegm64() local 160 while( year < date->tm_year ) { in S_timegm64() 161 days += length_of_year[IS_LEAP(year)]; in S_timegm64() 162 year++; in S_timegm64() 166 Year year = 69; in S_timegm64() local 168 days -= length_of_year[IS_LEAP(year)]; in S_timegm64() 169 year--; in S_timegm64() 170 } while( year >= date->tm_year ); in S_timegm64() [all …]
|
| /openbsd-src/gnu/usr.bin/perl/cpan/Time-Local/lib/Time/ |
| H A D | Local.pm | 59 # recent localtime()'s limit is the year 2**31 104 my $year = $_[5] + 1900 - int( $month / 10 ); 106 ( ( 365 * $year ) 107 + int( $year / 4 ) 108 - int( $year / 100 ) 109 + int( $year / 400 ) 126 my ( $sec, $min, $hour, $mday, $month, $year ) = @_; 131 $year -= 1900; 134 if ( $year >= 1000 ) { 135 $year [all...] |
| /openbsd-src/usr.bin/cal/ |
| H A D | cal.c | 110 /* leap year -- account for gregorian reformation in 1752 */ 123 /* number of leap years between year 1 and this year, not inclusive */ 150 int ch, month, year, yflag; in main() local 156 yflag = year = 0; in main() 204 errx(1, "illegal year value: use 1-9999"); in main() 207 year = local_time->tm_year + 1900; in main() 209 year = strtonum(*argv, 1, 9999, &errstr); in main() 211 errx(1, "illegal year value: use 1-9999"); in main() 217 year in main() 243 week(int day,int month,int year) week() argument 270 isoweek(int day,int month,int year) isoweek() argument 299 monthly(int month,int year) monthly() argument 329 j_yearly(int year) j_yearly() argument 364 yearly(int year) yearly() argument 424 day_array(int month,int year,int * days) day_array() argument 445 day_in_year(int day,int month,int year) day_in_year() argument 463 day_in_week(int day,int month,int year) day_in_week() argument [all...] |
| H A D | README | 12 calculate the number of days in all prior years (year-1)*365 13 add the number of leap years (days?) since year 1 14 (not including this year as that is covered later) 15 add the day number within the year 16 this compensates for the non-inclusive leap year 32 to the date for which the leap year is being calculated. A year that occurs 33 before the reformation is determined to be a leap year if its modulo of 34 4 equals zero. But after the reformation, a year is only a leap year i [all...] |
| /openbsd-src/usr.bin/at/ |
| H A D | parsetime.c | 458 assign_date(struct tm *tm, int mday, int mon, int year) in assign_date() argument 465 if (year != -1) { in assign_date() 466 if (year >= 1900) in assign_date() 467 year -= 1900; /* convert from 4 digit year */ in assign_date() 468 else if (year < 100) { in assign_date() 470 year += (tm->tm_year / 100) * 100; in assign_date() 472 if (year == tm->tm_year - 1) in assign_date() 473 year++; /* Common off by one error */ in assign_date() 474 else if (year < tm->tm_year) in assign_date() 475 year += 100; /* must be in next century */ in assign_date() [all …]
|
| /openbsd-src/sys/kern/ |
| H A D | clock_subr.c | 52 static inline int leapyear(int year); 70 leapyear(int year) in leapyear() argument 74 if ((year & 3) == 0) { in leapyear() 76 if ((year % 100) == 0) { in leapyear() 78 if ((year % 400) == 0) in leapyear() 89 int i, year, days; in clock_ymdhms_to_secs() local 91 year = dt->dt_year; in clock_ymdhms_to_secs() 98 for (i = POSIX_BASE_YEAR; i < year; i++) in clock_ymdhms_to_secs() 100 if (leapyear(year) && dt->dt_mon > FEBRUARY) in clock_ymdhms_to_secs()
|
| /openbsd-src/lib/libcrypto/asn1/ |
| H A D | a_time_posix.c | 43 is_valid_date(int64_t year, int64_t month, int64_t day) in is_valid_date() argument 46 if (day < 1 || month < 1 || year < 0 || year > 9999) in is_valid_date() 65 if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) in is_valid_date() 105 posix_time_from_utc(int64_t year, int64_t month, int64_t day, int64_t hours, in posix_time_from_utc() argument 110 if (!is_valid_date(year, month, day) || in posix_time_from_utc() 114 year--; /* Start years on Mar 1, so leap days end a year. */ in posix_time_from_utc() 117 era = (year >= 0 ? year : year - 399) / 400; in posix_time_from_utc() 118 year_of_era = year - era * 400; in posix_time_from_utc()
|
| H A D | a_time_tm.c | 162 is_valid_day(int year, int month, int day) in is_valid_day() argument 181 if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) in is_valid_day() 201 int year, month, day, hour, min, sec, val; in asn1_time_parse_cbs() local 210 year = val * 100; in asn1_time_parse_cbs() 213 year += val; in asn1_time_parse_cbs() 215 year = 1900; in asn1_time_parse_cbs() 218 year += val; in asn1_time_parse_cbs() 219 if (year < 1950) in asn1_time_parse_cbs() 220 year += 100; in asn1_time_parse_cbs() 221 if (year >= 2050) in asn1_time_parse_cbs() [all …]
|
| /openbsd-src/sys/lib/libsa/ |
| H A D | ctime.c | 47 int ss, mm, hh, wday, month, year; in ctime() local 58 for (year = 1970; tt >= 365; year++) in ctime() 59 tt -= isleap(year)? 366: 365; in ctime() 66 if (month > 2 && isleap(year)) in ctime() 72 (int)tt, hh, mm, ss, year); in ctime()
|
| /openbsd-src/sys/dev/ic/ |
| H A D | mk48txx.c | 132 int year; in mk48txx_gettime() local 148 year = FROMBCD(bus_space_read_1(bt, bh, clkoff + MK48TXX_IYEAR)); in mk48txx_gettime() 150 year += mk->mk_year0; in mk48txx_gettime() 151 if (year < POSIX_BASE_YEAR && mk48txx_auto_century_adjust != 0 && in mk48txx_gettime() 153 year += 100; in mk48txx_gettime() 155 dt.dt_year = year; in mk48txx_gettime() 186 int year; in mk48txx_settime() local 191 year = dt.dt_year - mk->mk_year0; in mk48txx_settime() 192 if (year > 99 && mk48txx_auto_century_adjust != 0) in mk48txx_settime() 193 year -= 100; in mk48txx_settime() [all …]
|
| /openbsd-src/share/zoneinfo/ |
| H A D | leapseconds.awk | 201 quadcentury, century, quadyear, year, month, day) 230 year = int(day / ss_year_days) 231 year -= year == 4 232 day -= year * ss_year_days 246 year++ 248 ss_year = 1600 + quadcentury * 400 + century * 100 + quadyear * 4 + year
|
| /openbsd-src/sys/arch/i386/stand/libsa/ |
| H A D | time.c | 56 compute(int year, u_int8_t month, u_int8_t day, u_int8_t hour, in compute() argument 63 tt = (year - 1970) * 365 + monthcount[month] + day - 1; in compute() 66 for (month <= 2 ? year-- : 0; year >= 1970; year--) in compute() 67 if (isleap(year)) in compute()
|
| /openbsd-src/sys/arch/amd64/stand/libsa/ |
| H A D | time.c | 56 compute(int year, u_int8_t month, u_int8_t day, u_int8_t hour, in compute() argument 63 tt = (year - 1970) * 365 + monthcount[month] + day - 1; in compute() 66 for (month <= 2 ? year-- : 0; year >= 1970; year--) in compute() 67 if (isleap(year)) in compute()
|
| /openbsd-src/share/zoneinfo/datfiles/ |
| H A D | antarctica | 8 # To keep things manageable, we list only locations occupied year-round; see 19 # Argentina - year-round bases 36 # year-round bases 127 # Belgium - year-round base 130 # Brazil - year-round base 133 # Bulgaria - year-round base 136 # Chile - year-round bases and towns 145 # China - year-round bases 149 # France - year-round bases (also see "France & Italy") 158 # French Southern Territories with year [all...] |
| /openbsd-src/usr.bin/calendar/ |
| H A D | ostern.c | 37 easter(int year) /* 0 ... abcd, NOT since 1900 */ in easter() argument 43 e_a = year % 19; in easter() 44 e_b = year / 100; in easter() 45 e_c = year % 100; in easter() 61 if (isleap(year)) in easter()
|
| /openbsd-src/gnu/usr.bin/perl/cpan/Time-Piece/t/ |
| H A D | 07arith.t | 13 is($t2->year, 2000); 18 is($t3->year, 2000); 22 # this one wraps around to March because of the leap year 24 is($t4->year, 2001); 30 is($t6->year, 2009); 35 is($t7->year, 2009); 40 is($t8->year, 1990); 45 is($t9->year, 2008);
|
| /openbsd-src/sys/arch/alpha/alpha/ |
| H A D | clock.c | 84 int year; in rtc_gettime() local 88 year = 1900 + ct.year; in rtc_gettime() 89 if (year < 1970) in rtc_gettime() 90 year += 100; in rtc_gettime() 91 dt.dt_year = year; in rtc_gettime() 112 ct.year = dt.dt_year % 100; in rtc_settime()
|
| /openbsd-src/lib/libc/time/ |
| H A D | asctime.c | 73 char year[INT_STRLEN_MAXIMUM(int) + 2]; in asctime3() local 95 (void) strftime(year, sizeof year, "%Y", timeptr); in asctime3() 97 ((strlen(year) <= 4) ? ASCTIME_FMT : ASCTIME_FMT_B), in asctime3() 101 year); in asctime3()
|
| /openbsd-src/gnu/usr.bin/perl/cpan/Time-Piece/ |
| H A D | Piece.pm | 239 sub year { subroutine 361 sprintf("%d$sep%02d$sep%02d", $time->year, $time->mon, $time->[c_mday]); 369 sprintf("%02d$sep%02d$sep%d", $time->mon, $time->[c_mday], $time->year); 375 sprintf("%02d$sep%02d$sep%d", $time->[c_mday], $time->mon, $time->year); 394 my $jd = $time->_jd( $time->year, $time->mon, $time->mday, 460 my $year = shift; 461 return (($year %4 == 0) && !($year % 100 == 0)) || ($year % 400 == 0) 467 my $year = $time->year; 468 return _is_leap_year($year); 475 my $year = $time->year; [all …]
|
| /openbsd-src/gnu/usr.bin/perl/t/porting/ |
| H A D | copyright.t | 81 my ($year) = $copyright_msg =~ /.*\b(\d{4,})/s 84 $year; 93 my ($year) = $output =~ /copyright 1987.*\b(\d{4,})/i 96 $year;
|