Home
last modified time | relevance | path

Searched refs:year (Results 1 – 25 of 318) sorted by relevance

12345678910>>...13

/NextBSD/contrib/ntp/ntpd/
HDcheck_y2k.c138 #define Error(year) if ( (year)>=2036 && LocalTime.tm_year < 110 ) \ argument
146 int year; in main() local
155 year = ( sizeof( u_long ) > 4 ) /* save max span using year as temp */ in main()
164 yearend = year0 + year; in main()
173 (int)year0, (int)yearend, (int)year ); in main()
182 year = 1980; in main()
183 LocalTime.tm_year = year - 1900; in main()
185 Error(year); /* should increment Fatals */ in main()
190 (int)year, __FILE__, __LINE__, (int)Fatals, (int)Warnings ); in main()
194 year = 2100; /* test year > limit but CURRENT year < limit */ in main()
[all …]
HDrefclock_hopfser.c254 &pp->year); in hopfserial_receive()
266 (pp->year < 0) || (pp->year > 99)) { in hopfserial_receive()
274 pp->day = ymd2yd(pp->year,month,day); in hopfserial_receive()
280 if(pp->year < YEAR_PIVOT) { pp->year += 100; } /* < 98 */ in hopfserial_receive()
281 pp->year += 1900; in hopfserial_receive()
292 pp->year, in hopfserial_receive()
/NextBSD/usr.bin/calendar/
HDparsedata.c48 static char *floattoday(int year, double f);
50 static int wdayom (int day, int offset, int month, int year);
91 char *modifierindex, char *specialday, char *year, int *iyear) in determinestyle() argument
101 *year = '\0'; in determinestyle()
199 strcpy(year, p1); in determinestyle()
200 *iyear = (int)strtol(year, NULL, 10); in determinestyle()
342 char *year, int iyear) in debug_determinestyle() argument
355 if (year[0] != '\0') in debug_determinestyle()
356 printf("year: |%s| (%d)\n", year, iyear); in debug_determinestyle()
368 int year; member
[all …]
HDsunpos.c200 equinoxsolstice(int year, double UTCoffset, int *equinoxdays, int *solsticedays) in equinoxsolstice() argument
204 fequinoxsolstice(year, UTCoffset, fe, fs); in equinoxsolstice()
212 fequinoxsolstice(int year, double UTCoffset, double *equinoxdays, double *solsticedays) in fequinoxsolstice() argument
222 cumdays = cumdaytab[isleap(year)]; in fequinoxsolstice()
231 sunpos(year, 3, d, UTCoffset, 0, 0, 0, 0.0, 0.0, &L, &decleft); in fequinoxsolstice()
232 sunpos(year, 3, d + 1, UTCoffset, 0, 0, 0, 0.0, 0.0, in fequinoxsolstice()
243 sunpos(year, 3, d, UTCoffset, in fequinoxsolstice()
270 sunpos(year, 9, d, UTCoffset, 0, 0, 0, 0.0, 0.0, &L, &decleft); in fequinoxsolstice()
271 sunpos(year, 9, d + 1, UTCoffset, 0, 0, 0, 0.0, 0.0, in fequinoxsolstice()
282 sunpos(year, 9, d, UTCoffset, in fequinoxsolstice()
[all …]
HDostern.c46 easter(int year) /* 0 ... abcd, NOT since 1900 */ in easter() argument
55 G = year % 19; in easter()
56 C = year / 100; in easter()
59 J = (year + year / 4 + I + 2 - C + C / 4) % 7; in easter()
63 if (isleap(year)) in easter()
HDdates.c39 int year; /* 19xx, 20xx, 21xx */ member
52 struct cal_year *year; /* points back */ member
63 struct cal_year *year; /* points back */ member
95 if (py->year == y + 1900) in createdate()
105 py->year = y + 1900; in createdate()
135 pm->year = py; in createdate()
157 pd->year = py; in createdate()
242 printf("%-5d (wday:%d)\n", y->year, y->firstdayofweek); in dumpdates()
271 if (y->year != yy) { in remember_ymd()
307 if (y->year != yy) { in remember_yd()
[all …]
HDcalendar.h124 int year; member
187 void addtodate(struct event *e, int year, int month, int day);
191 void pom(int year, double UTCoffset, int *fms, int *nms);
192 void fpom(int year, double utcoffset, double *ffms, double *fnms);
195 void equinoxsolstice(int year, double UTCoffset, int *equinoxdays, int *solsticedays);
196 void fequinoxsolstice(int year, double UTCoffset, double *equinoxdays, double *solsticedays);
197 int calculatesunlongitude30(int year, int degreeGMToffset, int *ichinesemonths);
HDpaskha.c41 j2g(int year) in j2g() argument
43 return (year < 1500) ? in j2g()
45 10 + (year/100 - 16) - ((year/100 - 16) / 4); in j2g()
/NextBSD/sys/kern/
HDsubr_clock.c110 leapyear(int year) in leapyear() argument
114 if ((year & 3) == 0) { in leapyear()
116 if ((year % 100) == 0) { in leapyear()
118 if ((year % 400) == 0) in leapyear()
129 ct->year, ct->mon, ct->day, in print_ct()
136 int i, year, days; in clock_ct_to_ts() local
138 year = ct->year; in clock_ct_to_ts()
148 ct->day > days_in_month(year, ct->mon) || in clock_ct_to_ts()
150 (sizeof(time_t) == 4 && year > 2037)) { /* time_t overflow */ in clock_ct_to_ts()
161 for (i = POSIX_BASE_YEAR; i < year; i++) in clock_ct_to_ts()
[all …]
/NextBSD/contrib/ntp/tests/libntp/
HDcalendar.c9 static int leapdays(int year);
13 int leapdays(int year);
64 leapdays(int year) in leapdays() argument
66 if (year % 400 == 0) in leapdays()
68 if (year % 100 == 0) in leapdays()
70 if (year % 4 == 0) in leapdays()
81 cal->year, (u_int)cal->month, (u_int)cal->monthday, in CalendarFromCalToString()
94 iso->year, (u_int)iso->week, (u_int)iso->weekday, in CalendarFromIsoToString()
105 if (expected->year == actual->year && in IsEqualCal()
131 if (expected->year == actual->year && in IsEqualIso()
[all …]
/NextBSD/usr.bin/at/
HDparsetime.c427 assign_date(struct tm *tm, long mday, long mon, long year) in assign_date() argument
434 if (year != -1) { in assign_date()
435 if (year >= 1900) in assign_date()
436 year -= 1900; /* convert from 4 digit year */ in assign_date()
437 else if (year < 100) { in assign_date()
446 year += (lt->tm_year / 100) * 100; in assign_date()
448 if (year == lt->tm_year - 1) year++; in assign_date()
449 else if (year < lt->tm_year) in assign_date()
450 year += 100; /* must be in next century */ in assign_date()
454 if (year < 0 && in assign_date()
[all …]
/NextBSD/sys/dev/mc146818/
HDmc146818.c109 int timeout, cent, year; in mc146818_gettime() local
140 year = FROMREG((*sc->sc_mcread)(dev, MC_YEAR)); in mc146818_gettime()
141 year += sc->sc_year0; in mc146818_gettime()
144 year += cent * 100; in mc146818_gettime()
145 } else if (year < POSIX_BASE_YEAR) in mc146818_gettime()
146 year += 100; in mc146818_gettime()
149 ct.year = year; in mc146818_gettime()
195 int cent, year; in mc146818_settime() local
220 year = ct.year - sc->sc_year0; in mc146818_settime()
222 cent = year / 100; in mc146818_settime()
[all …]
/NextBSD/sys/dev/mk48txx/
HDmk48txx.c162 int year; in mk48txx_gettime() local
192 year = FROMBCD(FROMREG(MK48TXX_IYEAR, MK48TXX_YEAR_MASK)); in mk48txx_gettime()
193 year += sc->sc_year0; in mk48txx_gettime()
195 year += (FROMREG(MK48TXX_IWDAY, MK48TXX_WDAY_CB) >> in mk48txx_gettime()
197 else if (year < POSIX_BASE_YEAR) in mk48txx_gettime()
198 year += 100; in mk48txx_gettime()
202 ct.year = year; in mk48txx_gettime()
224 int cent, year; in mk48txx_settime() local
254 year = ct.year - sc->sc_year0; in mk48txx_settime()
256 cent = year / 100; in mk48txx_settime()
[all …]
/NextBSD/usr.bin/chpass/
HDutil.c88 int day, month, year; in atot() local
118 year = atoi(t); in atot()
122 if (year < 69) in atot()
123 year += 2000; in atot()
124 else if (year < 100) in atot()
125 year += 1900; in atot()
126 if (year < 1969) in atot()
128 lt->tm_year = year - 1900; in atot()
/NextBSD/contrib/ntp/libntp/
HDuglydate.c24 int year; in uglydate() local
35 year = 0; in uglydate()
41 year = tm->tm_year; in uglydate()
42 while (year >= 100) in uglydate()
43 year -= 100; in uglydate()
46 "%17s %02d:%03d:%02d:%02d:%02d.%03ld", timep, year, in uglydate()
/NextBSD/contrib/tzdata/
HDantarctica5 # To keep things manageable, we list only locations occupied year-round; see
18 # Argentina - year-round bases
35 # year-round bases
96 # Belgium - year-round base
99 # Brazil - year-round base
102 # Bulgaria - year-round base
105 # Chile - year-round bases and towns
113 # China - year-round bases
117 # France - year-round bases (also see "France & Italy")
126 # French Southern Territories with year-round inhabitants
[all …]
/NextBSD/contrib/ntp/parseutil/
HDdcfd.c208 long year; member
473 clock_time->year = ext_bf(buffer, DCF_Y10); in convert_rawdcf()
474 clock_time->year = TIMES10(clock_time->year) + ext_bf(buffer, DCF_Y1); in convert_rawdcf()
779 if ( clock_time->year < YEAR_PIVOT ) /* in case of Y2KFixes [ */ in dcf_to_unixtime()
780 clock_time->year += 100; /* *year%100, make tm_year */ in dcf_to_unixtime()
782 if ( clock_time->year < YEAR_BREAK ) /* (failsafe if) */ in dcf_to_unixtime()
783 clock_time->year += 1900; /* Y2KFixes ] */ in dcf_to_unixtime()
788 if (clock_time->year < (YEAR_PIVOT + 1900) ) /* Y2KFixes */ in dcf_to_unixtime()
800 t = julian0( clock_time->year ) - julian0( 1970 ); in dcf_to_unixtime()
810 if (clock_time->month < 3 && days_per_year(clock_time->year) == 366) in dcf_to_unixtime()
[all …]
/NextBSD/contrib/ntp/
HDNOTES.y2kfixes51 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
/NextBSD/contrib/ntp/util/
HDtg.c263 int minute, hour, day, year; in main() local
270 year = 0; in main()
311 sscanf(optarg, "%2d%3d%2d%2d", &year, &day, in main()
357 year = tm->tm_year % 100; in main()
376 year, day, hour, minute, second, tone); in main()
378 year / 10, day, hour, minute, year % 10); in main()
393 0, year, day, hour, minute, second); in main()
424 if (day >= (year & 0x3 ? 366 : 367)) { in main()
431 year++; in main()
435 "%01d%03d%02d%02d%01d", year / 10, in main()
[all …]
/NextBSD/sys/dev/iicbus/
HDpcf8563.c175 ct.year = FROMBCD(val[PCF8563_R_YEAR] & PCF8563_M_YEAR); in pcf8563_gettime()
176 ct.year += sc->sc_year0; in pcf8563_gettime()
177 if (ct.year < POSIX_BASE_YEAR) in pcf8563_gettime()
178 ct.year += 100; /* assume [1970, 2069] */ in pcf8563_gettime()
180 if (ct.year >= 100 + sc->sc_year0) in pcf8563_gettime()
182 } else if (ct.year < 100 + sc->sc_year0) in pcf8563_gettime()
212 val[PCF8563_R_YEAR] = TOBCD(ct.year % 100); in pcf8563_settime()
214 if (ct.year >= 100 + sc->sc_year0) in pcf8563_settime()
216 } else if (ct.year < 100 + sc->sc_year0) in pcf8563_settime()
/NextBSD/contrib/unbound/sldns/
HDparseutil.c52 is_leap_year(int year) in is_leap_year() argument
54 return LDNS_MOD(year, 4) == 0 && (LDNS_MOD(year, 100) != 0 in is_leap_year()
55 || LDNS_MOD(year, 400) == 0); in is_leap_year()
74 int year = 1900 + tm->tm_year; in sldns_mktime_from_utc() local
75 time_t days = 365 * ((time_t) year - 1970) + leap_days(1970, year); in sldns_mktime_from_utc()
84 if (tm->tm_mon > 1 && is_leap_year(year)) { in sldns_mktime_from_utc()
101 int year = 1970; in sldns_year_and_yday_from_days_since_epoch() local
104 while (days < 0 || days >= (int64_t) (is_leap_year(year) ? 366 : 365)) { in sldns_year_and_yday_from_days_since_epoch()
105 new_year = year + (int) LDNS_DIV(days, 365); in sldns_year_and_yday_from_days_since_epoch()
106 days -= (new_year - year) * 365; in sldns_year_and_yday_from_days_since_epoch()
[all …]
/NextBSD/share/doc/papers/
HDbsdreferences.bib11 year = {2014}
22 year = {2003},
42 year = {2008},
59 year = {2004},
74 year = {2011},
93 year = {2008},
114 year = {2015},
134 year = {2015},
151 year = {2015},
172 year = {2000},
[all …]
/NextBSD/contrib/tzcode/stdtime/
HDasctime.c95 char year[INT_STRLEN_MAXIMUM(int) + 2]; local
114 (void) strftime(year, sizeof year, "%Y", timeptr);
119 ((strlen(year) <= 4) ? ASCTIME_FMT : ASCTIME_FMT_B),
123 year);
/NextBSD/contrib/ldns/
HDutil.c174 is_leap_year(int year) in is_leap_year() argument
176 return LDNS_MOD(year, 4) == 0 && (LDNS_MOD(year, 100) != 0 in is_leap_year()
177 || LDNS_MOD(year, 400) == 0); in is_leap_year()
196 int year = 1900 + tm->tm_year; in ldns_mktime_from_utc() local
197 time_t days = 365 * ((time_t) year - 1970) + leap_days(1970, year); in ldns_mktime_from_utc()
206 if (tm->tm_mon > 1 && is_leap_year(year)) { in ldns_mktime_from_utc()
229 int year = 1970; in ldns_year_and_yday_from_days_since_epoch() local
232 while (days < 0 || days >= (int64_t) (is_leap_year(year) ? 366 : 365)) { in ldns_year_and_yday_from_days_since_epoch()
233 new_year = year + (int) LDNS_DIV(days, 365); in ldns_year_and_yday_from_days_since_epoch()
234 days -= (new_year - year) * 365; in ldns_year_and_yday_from_days_since_epoch()
[all …]
/NextBSD/crypto/heimdal/doc/
HDmdate-sh67 *:*) set `date`; eval year=\$$#
86 year=`expr $year - 1`
88 *) year=$3;;
92 echo $day $month $year

12345678910>>...13