/freebsd/contrib/ntp/ntpd/ |
H A D | check_y2k.c | 105 #define GoodLeap(Year) (((Year)%4 || (!((Year)%100) && (Year)%400)) ? 0 : 13 ) argument 110 Days ( int Year ) /* return number of days since year "0" */ in Days() argument 114 Return = Year * 365; /* first aproximation to the value */ in Days() 115 if ( Year >= 1 ) in Days() 118 Return += (Year+3) / 4; /* add in (too many) leap days */ in Days() 119 Return -= (Year-1) / 100; /* reduce by (too many) centurys */ in Days() 120 Return += (Year-1) / 400; /* get final answer */ in Days() 126 static int year0 = 1900; /* sarting year for NTP time */ 127 static int yearend; /* ending year we test for NTP time. 129 **year in which NTP time overflows. [all …]
|
/freebsd/contrib/llvm-project/libcxx/include/__chrono/ |
H A D | year.h | 31 class year { 36 year() = default; 37 _LIBCPP_HIDE_FROM_ABI explicit inline constexpr year(int __val) noexcept : __y_(static_cast<short>(__val)) {} in year() function 39 _LIBCPP_HIDE_FROM_ABI inline constexpr year& operator++() noexcept { 43 _LIBCPP_HIDE_FROM_ABI inline constexpr year operator++(int) noexcept { 44 year __tmp = *this; 48 _LIBCPP_HIDE_FROM_ABI inline constexpr year& operator--() noexcept { in is_leap() 52 _LIBCPP_HIDE_FROM_ABI inline constexpr year operator--(int) noexcept { in max() 53 year __tmp = *this; 57 _LIBCPP_HIDE_FROM_ABI constexpr year [all...] |
H A D | year_month_day.h | 20 #include <__chrono/year.h> 40 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 87 return year_month_day{chrono::year{__yr + (__mth <= 2)}, chrono::month{__mth}, chrono::day{__dy}}; in __from_days() 108 …return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month() && __lhs.day() == __rhs.day(… 113 if (auto __c = __lhs.year() <=> __rhs.year(); __c != 0) 121 return year_month_day{__lhs.year(), __lhs.month(), __rhs}; 128 _LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day operator/(const year& __lhs, const month_day&… 133 return year(__lhs) / __rhs; [all …]
|
H A D | year_month_weekday.h | 21 #include <__chrono/year.h> 37 chrono::year __y_; 44 const chrono::year& __yval, const chrono::month& __mval, const chrono::weekday_indexed& __wdival) noexcept in year_month_weekday() 55 _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y_; } in year() function 83 return year_month_weekday{__ymd.year(), __ymd.month(), __wd[(static_cast<unsigned>(__ymd.day()) - 1) / 7 + 1]}; in __from_days() 93 return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month() && in __to_days() 99 return year_month_weekday{__lhs.year(), __lhs.month(), __rhs}; 103 operator/(const year 166 _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y_; } year() function [all...] |
H A D | year_month.h | 15 #include <__chrono/year.h> 30 chrono::year __y_; 35 _LIBCPP_HIDE_FROM_ABI constexpr year_month(const chrono::year& __yval, const chrono::month& __mval) noexcept in year_month() 37 _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year year() const noexcept { return __y_; } in year() function 46 _LIBCPP_HIDE_FROM_ABI inline constexpr year_month operator/(const year& __y, const month& __m) noexcept { 50 _LIBCPP_HIDE_FROM_ABI inline constexpr year_month operator/(const year& __y, int __m) noexcept { 55 return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month(); 60 if (auto __c = __lhs.year() < [all...] |
/freebsd/sys/kern/ |
H A D | subr_fattime.c | 33 * yyyyyyymmmmddddd (year - 1980, month, day) 54 * The conversion functions below cut time into four-year leap-year 63 * FAT timestamps have 7 bits for the year and starts at 1980, so 64 * they can represent up to 2107 which means that the non-leap-year 79 #define YEAR 365 /* Length of normal year */ macro 80 #define LYC (4 * YEAR + 1) /* Length of 4 year leap-year cycl [all...] |
H A D | subr_clock.c | 96 * some recent year avoids lots of unnecessary loop iterations in conversion. 113 * ( ((year % 4) == 0 && 114 * (year % 100) != 0) || 115 * ((year % 400) == 0) ) 119 leapyear(int year) in leapyear() argument 123 if ((year & 3) == 0) { in leapyear() 125 if ((year % 100) == 0) { in leapyear() 127 if ((year % 400) == 0) in leapyear() 137 int i, year, days; in clock_ct_to_ts() local 146 * Many realtime clocks store the year as 2-digit BCD; pivot on 70 to in clock_ct_to_ts() [all …]
|
/freebsd/usr.bin/calendar/ |
H A D | parsedata.c | 50 static char *floattoday(int year, double f); 52 static int wdayom (int day, int offset, int month, int year); 93 char *modifierindex, char *specialday, char *year, int *iyear) in determinestyle() argument 103 *year = '\0'; in determinestyle() 200 /* We have a year in the string. Now this is getting tricky */ in determinestyle() 201 strlcpy(year, p1, SLEN); in determinestyle() 202 *iyear = (int)strtol(year, NULL, 10); in determinestyle() 341 char *year, int iyear) in debug_determinestyle() argument 354 if (year[0] != '\0') in debug_determinestyle() 355 printf("year: |%s| (%d)\n", year, iyear); in debug_determinestyle() [all …]
|
/freebsd/lib/libcalendar/ |
H A D | calendar.3 | 44 .Fn easterg "int year" "struct date *dt" 46 .Fn easterog "int year" "struct date *dt" 48 .Fn easteroj "int year" "struct date *dt" 58 .Fn week "int nd" "int *year" 63 starting at March 1st, year zero (i.e., 1 B.C.) and ending way beyond 64 year 100000. 99 provide conversions between the common "year, month, day" notation 102 The days are numbered from March 1st year 1 B.C., starting 104 year 1 B.C. 138 The two calendars differ by the definition of the leap year. [all …]
|
H A D | calendar.c | 37 * For each month tabulate the number of days elapsed in a year before the 38 * month. This assumes the internal date representation, where a year 40 * But we do need a special table for the year 1582, since 10 days are 60 static int firstweek(int year); 64 * March 1st of year zero. 73 * Compute the year by starting with an approximation not smaller in jdate() 75 * year which does not begin after ndays. in jdate() 84 * Set r to the days left in the year and compute the month by in jdate() 100 * Return the number of days since March 1st of the year zero. 127 * days since March 1st, year zero. The date computed will be Julian if it [all …]
|
/freebsd/contrib/ntp/include/ |
H A D | ntp_calendar.h | 13 uint16_t year; /* year (A.D.) */ member 14 uint16_t yearday; /* day of year, 1 = January 1 */ 27 uint16_t year; /* year (A.D.) */ member 28 uint8_t week; /* 1..53, week in year */ 83 * We deal in a 4 year cycle starting at March 1, 1900. We assume 91 #define DAYSPERYEAR (365) /* days per year */ 96 #define SECSPERYEAR (365 * SECSPERDAY) /* regular year */ 97 #define SECSPERLEAPYEAR (366 * SECSPERDAY) /* leap year */ 98 #define SECSPERAVGYEAR 31556952 /* mean year length over 400yrs */ 193 * Convert a number of elapsed month in a year into elapsed days [all …]
|
/freebsd/contrib/ntp/libntp/ |
H A D | clocktime.c | 2 * clocktime - compute the NTP date from a day of year, hour, minute 21 * change when we are already less than a half year from the receive 22 * time stamp. Since the length of a year is variable we use a 35 * Take a time spec given as day-of-year, hour, minute and second as 38 * (rec_ui+0.5yrs). A hint for the current start-of-year will be 42 * '*yearstart' will receive the associated start-of-year. 53 int yday , /* day-of-year */ in clocktime() 59 u_long *yearstart, /* cached start-of-year, should be fixed to u_int32 */ in clocktime() 62 u_int32 ystt[3]; /* year start */ in clocktime() 68 * Compute the offset into the year in seconds. Note that in clocktime() [all …]
|
/freebsd/contrib/dialog/ |
H A D | calendar.c | 40 #define HDR_HIGH 1 /* height of cells with month/year */ 43 /* two more lines: titles for day-of-week and month/year boxes */ 182 adjust_year_month(int *year, int *month) in adjust_year_month() argument 186 *year -= 1; in adjust_year_month() 190 *year += 1; in adjust_year_month() 195 days_per_month(int year, int month) in days_per_month() argument 204 adjust_year_month(&year, &month); in days_per_month() 207 result += isleap(year); in days_per_month() 214 int year = current->tm_year + 1900; in days_in_month() local 217 adjust_year_month(&year, &month); in days_in_month() [all …]
|
/freebsd/contrib/tzdata/ |
H A D | leapseconds.awk | 7 # timestamps this program works only to the year 2216, which is the 8 # year 1900 plus 10**10 seconds. However, in practice 10 # and so support exact integers through 2**53. By the year 2216, 12 # timestamps this program should be good until the year 285,428,681 13 # (the year 1900 plus 2**53 seconds). By then leap seconds will be 55 print "# Leap YEAR MON DAY 23:59:59 - S" 57 print "# Leap YEAR MON DAY 23:59:60 + S" 163 # ss_year - Gregorian calendar year 164 # ss_month - month of the year (1-January to 12-December) 188 # Counts of days in a Gregorian year, quad-year, century, and quad-century. [all …]
|
H A D | antarctica | 7 # To keep things manageable, we list only locations occupied year-round; see 18 # Argentina - year-round bases 35 # year-round bases 126 # Belgium - year-round base 129 # Brazil - year-round base 132 # Bulgaria - year-round base 135 # Chile - year-round bases and towns 144 # China - year-round bases 148 # France - year-round bases (also see "France & Italy") 157 # French Southern Territories with year [all...] |
/freebsd/crypto/krb5/src/tests/ |
H A D | t_y2038.py | 4 # has elapsed, and may start exhibiting problems around the year 2075. 41 year = int(out.split()[-1]) variable 42 if year < 2038 or year > 9999: 43 fail('password expiration year') 52 # affect the display time by a little bit, so just look for the year. 58 # range-check the expiration year as reported by klist. 65 fail('unexpected tgt expiration year') 67 fail('unexpected tgt rtill year') 69 fail('unexpected service ticket expiration year') 71 fail('unexpected service ticket rtill year') [all …]
|
/freebsd/usr.bin/ncal/ |
H A D | ncal.1 | 42 .Ar year 49 .Op Ar year 57 .Ar year 63 .Op Ar year 74 The new format is a little cramped but it makes a year fit 129 Display a calendar for the specified year. 158 A single parameter specifies the year (1\(en9999) to be displayed; 159 note the year must be fully specified: 165 year; the month is either a number between 1 and 12, or a full or 168 year default to those of the current system clock and time zone (so [all …]
|
/freebsd/contrib/ntp/ |
H A D | NOTES.y2kfixes | 51 calculations that did not support year 2000 as a leap year 54 not traditional Y2K errors, would break in the year 2000. 82 Has logic I believe will fail starting in year 2100 or so. 92 NOTE: Author (falsely) stated Y2K is NOT a leap year when it 96 for year so year 2000 will revert to "00". 100 Some very strange logic in manipulating year values: 101 1122 instance->pp->year = buf[6]*256+buf[7]; 105 The entire protocol is binary, the year is a 16 bit quantity
|
/freebsd/usr.bin/at/ |
H A D | parsetime.c | 100 { "year", YEARS,0 }, /* year ... */ 425 * assign_date() assigns a date, wrapping to next year if needed 428 assign_date(struct tm *tm, long mday, long mon, long year) in assign_date() argument 432 * Convert year into tm_year format (year - 1900). in assign_date() 433 * We may be given the year in 2 digit, 4 digit, or tm_year format. in assign_date() 435 if (year != -1) { in assign_date() 436 if (year >= 1900) in assign_date() 437 year -= 1900; /* convert from 4 digit year */ in assign_date() 438 else if (year < 100) { in assign_date() 439 /* convert from 2 digit year */ in assign_date() [all …]
|
/freebsd/stand/efi/libefi/ |
H A D | time.c | 62 * The value at index 13 is for the whole year. 111 efi_time->Year = 1970; in to_efi_time() 112 lyear = isleap(efi_time->Year); in to_efi_time() 117 efi_time->Year++; in to_efi_time() 118 lyear = isleap(efi_time->Year); in to_efi_time() 153 int Year; in from_efi_time() local 158 if (ETime->Year < 1998 || ETime->Year > 2099 || in from_efi_time() 171 for (Year = 1970; Year != ETime->Year; ++Year) { in from_efi_time() 172 UTime += (CumulativeDays[isleap(Year)][13] * SECSPERDAY); in from_efi_time() 176 * UTime should now be set to 00:00:00 on Jan 1 of the file's year. in from_efi_time() [all …]
|
/freebsd/contrib/tzcode/ |
H A D | date.1 | 73 %D 03/08/89 Month/day/year (eight characters) 95 %y 89 Last two digits of year 96 %Y 1989 Year in full 112 the first Sunday of the year begins week 1; 116 the first Monday of the year begins week 1. 126 8903081454 Year, month, month day, hours, minutes 127 0308145489 Month, month day, hours, minutes, year 129 030814541989 Month, month day, hours, minutes, four-digit year 130 198903081454 Four-digit year, month, month day, hours, minutes 134 If the century, year, month, or month day is not given,
|
/freebsd/contrib/netbsd-tests/dev/clock_subr/ |
H A D | clock_subr_test_data_gen.sh | 16 for year in `seq 1970 1 2030`; do 17 datesub -d "${year}/01/01 00:00:00" 18 datesub -d "${year}/07/01 00:00:00" 20 for year in `seq 2000 25 2600`; do 21 datesub -d "$((${year} - 1))/12/31 23:59:59" 22 datesub -d "$((${year} + 0))/01/01 00:00:00" 23 datesub -d "$((${year} + 1))/01/01 00:00:00"
|
/freebsd/lib/libc/stdtime/ |
H A D | strftime.3 | 100 is replaced by (year / 100) as decimal number; single 128 is replaced by a year as a decimal number with century. 129 This year is the one that contains the greater part of 132 is replaced by the same year as in 143 is replaced by the day of the year as a decimal number (001-366). 182 is replaced by the week number of the year (Sunday as the first day of 188 is replaced by the week number of the year (Monday as the first day of 191 1 has four or more days in the new year, then it is week 1; otherwise 192 it is the last week of the previous year, and the next week is week 1. 197 is replaced by the week number of the year (Monday as the first day of [all …]
|
/freebsd/crypto/heimdal/doc/ |
H A D | mdate-sh | 41 # Find the month. Next argument is day, followed by the year or time. 65 # the time of day or the year. 67 *:*) set `date`; eval year=\$$# 82 # For the first six month of the year the time notation can also 83 # be used for files modified in the last year. 86 year=`expr $year - 1` 88 *) year=$3;; 92 echo $day $month $year
|
/freebsd/sys/sys/ |
H A D | clock.h | 59 * On input, the year is interpreted as follows: 64 * 1970 - 9999 = Full 4-digit century+year. 69 * clock_ct_to_ts() returns EINVAL if any values are out of range. The year 73 int year; /* year (4 digit year) */ member 91 * The clock_bcd_to_ts() function interprets the values in the year through sec 94 * undergo further validation as described above. Year may be 2 or 4-digit BCD, 101 * into year through sec. The value in year will be 4-digit BCD (e.g., 109 uint16_t year; /* year (2 or 4 digit year) */ member 169 /* Traditional POSIX base year */
|