Home
last modified time | relevance | path

Searched refs:date (Results 1 – 25 of 509) sorted by relevance

12345678910>>...21

/dflybsd-src/usr.bin/calendar/
H A Djulian.c75 fixed_from_julian(const struct date *date) in fixed_from_julian() argument
77 int y = (date->year >= 0) ? date->year : (date->year + 1); in fixed_from_julian()
80 div_floor(date->month * 367 - 362, 12)); in fixed_from_julian()
82 if (date->month <= 2) in fixed_from_julian()
83 return rd + date->day; in fixed_from_julian()
84 else if (julian_leap_year(date->year)) in fixed_from_julian()
85 return rd + date->day - 1; in fixed_from_julian()
87 return rd + date->day - 2; in fixed_from_julian()
96 julian_from_fixed(int rd, struct date *date) in julian_from_fixed() argument
100 date->year = div_floor(4 * (rd - epoch) + 1464, 1461); in julian_from_fixed()
[all …]
H A Dgregorian.c77 fixed_from_gregorian(const struct date *date) in fixed_from_gregorian() argument
79 int rd = ((epoch - 1) + 365 * (date->year - 1) + in fixed_from_gregorian()
80 div_floor(date->year - 1, 4) - in fixed_from_gregorian()
81 div_floor(date->year - 1, 100) + in fixed_from_gregorian()
82 div_floor(date->year - 1, 400) + in fixed_from_gregorian()
83 div_floor(date->month * 367 - 362, 12)); in fixed_from_gregorian()
85 if (date->month <= 2) in fixed_from_gregorian()
86 return rd + date->day; in fixed_from_gregorian()
87 else if (gregorian_leap_year(date->year)) in fixed_from_gregorian()
88 return rd + date->day - 1; in fixed_from_gregorian()
[all …]
H A Ddates.c51 char date[32]; /* Date in Gregorian calendar */ member
65 struct date date; in generate_dates() local
73 gregorian_from_fixed(Options.day_begin, &date); in generate_dates()
74 year = date.year; in generate_dates()
75 month = date.month; in generate_dates()
76 day = date.day; in generate_dates()
78 date.day = 1; in generate_dates()
79 rd_month1 = fixed_from_gregorian(&date); in generate_dates()
80 if (date.month == 12) { in generate_dates()
81 date_set(&date, date.year+1, 1, 1); in generate_dates()
[all …]
H A Dchinese.c242 struct date date = { year, 7, 1 }; in chinese_new_year() local
243 int july1 = fixed_from_gregorian(&date); in chinese_new_year()
253 chinese_from_fixed(int rd, struct chinese_date *date) in chinese_from_fixed() argument
279 date->cycle = div_floor(elapsed_years - 1, 60) + 1; in chinese_from_fixed()
280 date->year = mod1(elapsed_years, 60); in chinese_from_fixed()
281 date->month = month; in chinese_from_fixed()
282 date->leap = leap_month; in chinese_from_fixed()
283 date->day = rd - m + 1; in chinese_from_fixed()
292 fixed_from_chinese(const struct chinese_date *date) in fixed_from_chinese() argument
295 ((date->cycle - 1) * 60 + date->year - 0.5)); in fixed_from_chinese()
[all …]
H A Dgregorian.h42 struct date;
44 int fixed_from_gregorian(const struct date *date);
45 int gregorian_date_difference(const struct date *date1,
46 const struct date *date2);
47 void gregorian_from_fixed(int rd, struct date *date);
H A Dbasics.h42 struct date { struct
49 date_set(struct date *date, int y, int m, int d) in date_set() argument
51 date->year = y; in date_set()
52 date->month = m; in date_set()
53 date->day = d; in date_set()
77 int nth_kday(int n, int dow, struct date *date);
H A Ddays.c155 struct date date; in find_days_yearly() local
200 date_set(&date, y, month, 1); in find_days_yearly()
201 approx = fixed_from_gregorian(&date); in find_days_yearly()
235 struct date date; in find_days_cjieqi() local
244 date_set(&date, y, 1, 1); in find_days_cjieqi()
245 rd_begin = fixed_from_gregorian(&date); in find_days_cjieqi()
246 date.year++; in find_days_cjieqi()
247 rd_end = fixed_from_gregorian(&date); in find_days_cjieqi()
292 struct date date; in find_days_moon() local
301 date_set(&date, y, 1, 1); in find_days_moon()
[all …]
H A Decclesiastical.c64 struct date april19 = { j_year, 4, 19 }; in orthodox_easter()
86 struct date april19 = { g_year, 4, 19 }; in easter()
101 struct date date = { g_year, 11, 30 }; in advent() local
105 rd = fixed_from_julian(&date); in advent()
107 rd = fixed_from_gregorian(&date); in advent()
H A Dparsedata.c64 static bool determine_style(const char *date, struct dateinfo *di);
132 determine_style(const char *date, struct dateinfo *di) in determine_style() argument
139 snprintf(date2, sizeof(date2), "%s", date); in determine_style()
202 __func__, m, date); in determine_style()
235 __func__, p2, date); in determine_style()
271 __func__, p2, date); in determine_style()
276 warnx("%s: unrecognized date: |%s|", __func__, date); in determine_style()
321 parse_cal_date(const char *date, int *flags, struct cal_day **dayp, char **edp) in parse_cal_date() argument
330 if (!determine_style(date, &di)) { in parse_cal_date()
399 __func__, date, Calendar->name); in parse_cal_date()
[all …]
H A Dsun.c399 struct date date = { year, 1, 1 }; in show_sun_info() local
405 date.month = event->month; in show_sun_info()
406 date.day = 1; in show_sun_info()
407 day_approx = fixed_from_gregorian(&date); in show_sun_info()
409 gregorian_from_fixed((int)floor(t), &date); in show_sun_info()
413 date.year, date.month, date.day, buf); in show_sun_info()
/dflybsd-src/lib/libcalendar/
H A Dcalendar.c46 typedef struct date date; typedef
50 static date jiswitch = {1582, 7, 3};
52 static date *date2idt(date *idt, date *dt);
53 static date *idt2date(date *dt, date *idt);
54 static int ndaysji(date *idt);
55 static int ndaysgi(date *idt);
62 date *
63 jdate(int ndays, date *dt) in jdate()
65 date idt; /* Internal date representation */ in jdate()
100 ndaysj(date *dt) in ndaysj()
[all …]
H A Dcalendar.h29 struct date { struct
35 struct date *easterg(int _year, struct date *_dt); argument
36 struct date *easterog(int _year, struct date *_dt);
37 struct date *easteroj(int _year, struct date *_dt);
38 struct date *gdate(int _nd, struct date *_dt);
39 struct date *jdate(int _nd, struct date *_dt);
40 int ndaysg(struct date *_dt);
41 int ndaysj(struct date *_dt);
H A Deaster.c32 typedef struct date date; typedef
37 date *
38 easterg(int y, date *dt) in easterg()
56 date *
57 easterog(int y, date *dt) in easterog()
64 date *
65 easteroj(int y, date * dt) in easteroj()
85 date dt; in easterodn()
/dflybsd-src/gnu/usr.bin/rcs/lib/
H A Drcsrev.c270 normalizeyear(date, year) in normalizeyear() argument
271 char const *date; in normalizeyear()
274 if (isdigit(date[0]) && isdigit(date[1]) && !isdigit(date[2])) {
277 year[2] = date[0];
278 year[3] = date[1];
282 return date;
287 cantfindbranch(revno, date, author, state) in cantfindbranch() argument
288 char const *revno, date[datesize], *author, *state; in cantfindbranch()
294 date ? " a date before " : "",
295 date ? date2str(date,datebuf) : "",
[all …]
H A Drcstime.c48 time2date(unixtime,date) in time2date() argument
50 char date[datesize];
53 VOID sprintf(date,
129 date2str(date, datebuf) in date2str() argument
130 char const date[datesize]; in date2str()
133 register char const *p = date;
140 + (date[2]=='.' && VERSION(5)<=RCSversion ? 0 : 2),
141 (int)(p-date-1), date,
151 t.tm_year = atoi(date) - (date[2]=='.' ? 0 : 1900);
/dflybsd-src/games/trek/
H A Dschedule.c54 double date; in schedule() local
56 date = Now.date + offset; in schedule()
66 type, date, i, x, y, z); in schedule()
69 e->date = date; in schedule()
90 double date; in reschedule() local
95 date = Now.date + offset; in reschedule()
96 e->date = date; in reschedule()
100 e->evcode, e->x, e->y, e->systemname, date); in reschedule()
122 e->evcode, e->date, e->x, e->y, e->systemname); in unschedule()
125 e->date = TOOLARGE; in unschedule()
/dflybsd-src/contrib/file/magic/Magdir/
H A Dmeteorological10 >>&32 string x \b, date %15.15s
14 >>&32 string x \b, date %15.15s
18 >>&32 string x \b, date %15.15s
22 >>&32 string x \b, date %15.15s
26 >>&32 string x \b, date %15.15s
30 >>&32 string x \b, date %15.15s
34 >>&32 string x \b, date %15.15s
38 >>&32 string x \b, date %15.15s
42 >>&32 string x \b, date %15.15s
/dflybsd-src/contrib/cvs-1.12/src/
H A Dentries.c40 const char *date, const char *ts_conflict) in Entnode_Create() argument
52 ent->date = xstrdup (date); in Entnode_Create()
72 if (ent->date) in Entnode_Destroy()
73 free (ent->date); in Entnode_Destroy()
201 const char *options, const char *tag, const char *date, in Register() argument
210 server_register (fname, vn, ts, options, tag, date, ts_conflict); in Register()
217 options, tag ? tag : "", date ? date : ""); in Register()
219 entnode = Entnode_Create (ENT_FILE, fname, vn, ts, options, tag, date, in Register()
256 if (sdtp->date) in freesdt()
257 free (sdtp->date); in freesdt()
[all …]
H A Dvers_ts.c41 Version_TS (struct file_info *finfo, char *options, char *tag, char *date, in Version_TS() argument
104 if (!(tag || date) && !(sdtp && sdtp->aflag)) in Version_TS()
107 vers_ts->date = xstrdup (entdata->date); in Version_TS()
162 if (tag || date) in Version_TS()
165 vers_ts->date = xstrdup (date); in Version_TS()
174 if (!vers_ts->date) in Version_TS()
175 vers_ts->date = xstrdup (sdtp->date); in Version_TS()
204 vers_ts->date, force_tag_match, in Version_TS()
458 if ((*versp)->date) in freevers_ts()
459 free ((*versp)->date); in freevers_ts()
H A Dclassify.c40 Classify_File (struct file_info *finfo, char *tag, char *date, char *options, in Classify_File() argument
47 vers = Version_TS (finfo, options, tag, date, in Classify_File()
64 if (!force_tag_match || !(vers->tag || vers->date)) in Classify_File()
78 if (!force_tag_match || !(vers->tag || vers->date)) in Classify_File()
410 if (aflag || vers->tag || vers->date) in sticky_ck()
413 char *entdate = vers->entdata->date; in sticky_ck()
417 (entdate && vers->date && strcmp (entdate, vers->date)) || in sticky_ck()
418 ((entdate && !vers->date) || (!entdate && vers->date))) in sticky_ck()
421 vers->options, vers->tag, vers->date, vers->ts_conflict); in sticky_ck()
H A Dcheckout.c95 static char *date; variable
125 tag = date = join_rev1 = join_date1 = join_rev2 = join_date2 = in checkout()
213 parse_tagdate (&tag, &date, optarg); in checkout()
217 if (date) free (date); in checkout()
218 date = Make_Date (optarg); in checkout()
260 if (!tag && !date) in checkout()
324 if (date) in checkout()
325 client_senddate (date); in checkout()
376 if (!date) in checkout()
379 history_name = date; in checkout()
[all …]
H A Dannotate.c29 static char *date = NULL; variable
81 parse_tagdate (&tag, &date, optarg); in annotate()
84 if (date) free (date); in annotate()
85 date = Make_Date (optarg); in annotate()
121 if (date) in annotate()
122 client_senddate (date); in annotate()
271 version = RCS_getversion (finfo->rcs, tag, date, force_tag_match, NULL); in annotate_fileproc()
H A Dadd.c197 char *date; in add() local
243 ParseTag (&tag, &date, &nonbranch); in add()
247 Create_Admin (p, argv[j], rcsdir, tag, date, in add()
261 if (date) in add()
262 free (date); in add()
536 vers->options, vers->tag, vers->date, NULL); in add()
636 vers->tag, vers->date, NULL); in add()
735 char *tag, *date; in add_directory() local
753 ParseTag (&tag, &date, &nonbranch); in add_directory()
791 date ? "--> Using per-directory sticky date `" : "", in add_directory()
[all …]
/dflybsd-src/test/stress/stress2/tools/
H A Dfreeze.sh34 t1=`date '+%s'`
36 t2=`date '+%s'`
39 d1=`date -j -f '%s' '+%T' $t1`
40 d2=`date -j -f '%s' '+%T' $t2`
41 e=` date -u -j -f '%s' '+%T' $delta`
H A Dfreeze2.sh34 t1=`date '+%s'`
37 t2=`date '+%s'`
40 d1=`date -j -f '%s' '+%T' $t1`
41 d2=`date -j -f '%s' '+%T' $t2`
42 e=` date -u -j -f '%s' '+%T' $delta`

12345678910>>...21