Lines Matching refs:day
64 uint8_t day;
73 unsigned int day;
1173 // We want (year, month, day of month); we have year and month, but we
1174 // need to turn (week, day-of-week) into day-of-month
1176 // Week 1 is the first week in which day `day` (where 0 = Sunday) appears.
1177 // Week 5 represents the last occurrence of day `day`, so we need to know
1189 // 2. Get first day - desired day mod 7 (adjusting by 7 for negative
1192 int8_t month_day = ((int8_t)(self->day) - (first_day + 1)) % 7;
1199 // occurrence of `day`
1216 calendarrule_new(uint8_t month, uint8_t week, uint8_t day, int8_t hour,
1222 // The d'th day (0 <= d <= 6) of week n of month m of the year (1 <= n <=
1223 // 5, 1 <= m <= 12, where week 5 means "the last d day in month m" which
1225 // week in which the d'th day occurs. Day zero is Sunday.
1236 // If the 'day' parameter type is changed to a signed type,
1237 // "day < 0" check must be added.
1238 if (/* day < 0 || */ day > 6) {
1249 .day = day,
1261 * This translates the day of the year into a local timestamp — either a
1262 * 1-based Julian day, not including leap days, or the 0-based year-day,
1276 // We subtract off an additional 1 day to account for January 1st (we want
1281 // The Julian day specification skips over February 29th in leap years,
1285 // years-February 28 is day 59 and March 1 is day 60. It is impossible to
1289 // always transitions on a given calendar day (other than February 29th),
1290 // you would use a Julian day, e.g. J91 always refers to April 1st and J365
1292 unsigned int day = self->day;
1293 if (self->julian && day >= 59 && is_leap_year(year)) {
1294 day += 1;
1297 return ((days_before_year + day) * 86400) + (self->hour * 3600) +
1303 dayrule_new(uint8_t julian, unsigned int day, int8_t hour, int8_t minute,
1309 if (day < julian || day > 365) {
1310 PyErr_Format(PyExc_ValueError, "day must be in [%u, 365], not: %u",
1311 julian, day);
1322 .day = day,
1747 // 1. Jn: Julian day n, with no leap days.
1749 // 3. Mm.n.d: Specifying by month, week and day-of-week.
1752 uint8_t month, week, day;
1769 uint8_t *values[2] = {&week, &day};
1797 if (calendarrule_new(month, week, day, hour, minute, second, rv)) {
1806 unsigned int day = 0;
1819 day *= 10;
1820 day += (*ptr) - '0';
1839 if (dayrule_new(julian, day, hour, minute, second, rv)) {
2178 /* Calculates ordinal datetime from year, month and day. */