Lines Matching defs:day
69 #define SPACE -1 /* used in day array */
120 * Subtracting the gregorian leap day count (for a given date) from
121 * the julian leap day count (for the same date) describes the number
250 errx(1, "illegal day of week value: use 0-6");
336 #define DAY_LEN 3 /* 3 spaces per day */
337 #define J_DAY_LEN 4 /* 4 spaces per day */
340 #define HEAD_SEP 2 /* spaces between day headings */
494 int day, dw, dm;
515 day = julian ? day_in_year(1, month, year) : 1;
518 (julian ? (day == tm->tm_yday) :
519 (month == tm->tm_mon && day == tm->tm_mday)))
520 days[dw++] = SPACE - day++;
522 days[dw++] = day++;
528 * return the 1 based day number within the year
531 day_in_year(int day, int month, int year)
537 day += days_in_month[leap][i];
538 return (day);
543 * return the 0 based day number for any date from 1 Jan. 1 to
544 * 31 Dec. 9999. Returns the day of the week of the first
545 * missing day for any given Gregorian shift.
548 day_in_week(int day, int month, int year)
553 + day_in_year(day, month, year);
562 ascii_day(char *p, int day)
575 if (day == SPACE) {
579 if (day < SPACE) {
581 day = SPACE - day;
585 if ((val = day / 100) != 0) {
586 day %= 100;
593 val = day / 10;
598 *p++ = day % 10 + '0';
600 day][0];
601 *p++ = aday[day][1];
709 * What about someone specifying a leap day in
714 * that a valid leap day?
786 * Once we know the day of the week of the first missing day,
787 * skip back to the first of the month's day of the week.
811 * and "julian day" representations) with respect for days
847 * Bounce back to the first "row" in the day array, and fill
855 * to calculate the absolute julian day for a given
921 "usage: cal [-3hjry] [-A after] [-B before] [-C context] [-d day-of-week] "