Lines Matching defs:month

184     int32_t year, month, dom, dow, doy, mid;
185 Grego::timeToFields(time, year, month, dom, dow, doy, mid);
189 appendAsciiDigits(month + 1, 2, str);
224 int32_t year = 0, month = 0, day = 0, hour = 0, min = 0, sec = 0;
247 month = parseAsciiDigits(str, 4, 2, status) - 1; // 0-based
258 int32_t maxDayOfMonth = Grego::monthLength(year, month);
259 if (year < 0 || month < 0 || month > 11 || day < 1 || day > maxDayOfMonth ||
272 UDate time = Grego::fieldsToDay(year, month, day) * U_MILLIS_PER_DAY;
367 * month calculated by BYMONTH-1, or -1 when not found
370 * dom an array of day of month
374 static void parseRRULE(const UnicodeString& rrule, int32_t& month, int32_t& dow, int32_t& wim,
381 month = -1;
425 // Note: BYMONTH may contain multiple months, but only single month make sense for
430 month = parseAsciiDigits(value, 0, value.length(), status) - 1;
431 if (U_FAILURE(status) || month < 0 || month >= 12) {
477 // the last day in a month
533 int32_t month, dayOfWeek, nthDayOfWeek, dayOfMonth = 0;
538 parseRRULE(rrule, month, dayOfWeek, nthDayOfWeek, days, daysCount, until, status);
547 if (daysCount != 7 || month == -1 || dayOfWeek == 0) {
552 int32_t firstDay = 31; // max possible number of dates in a month
558 days[i] = MONTHLENGTH[month] + days[i] + 1;
584 if (month == -1 || dayOfWeek == 0 || daysCount == 0) {
589 // We can only support 7 continuous days starting from a day of month.
596 // checking across month boundary
598 int32_t earliestMonth = month;
602 dom = dom > 0 ? dom : MONTHLENGTH[month] + dom + 1;
636 // Check if the month is same or right next to the primary month
637 if (tmp_month != month) {
639 int32_t diff = tmp_month - month;
641 // Previous month
647 // Next month
653 } else if (tmp_month != month && tmp_month != anotherMonth) {
658 // If earlier month, go through days to find the earliest day
671 month = earliestMonth;
679 if (month == -1) {
680 // If BYMONTH is not set, use the month of DTSTART
681 month = startMonth;
698 // Day in month rule, for example, 15th day in the month
699 adtr = new DateTimeRule(month, dayOfMonth, startMID, DateTimeRule::WALL_TIME);
702 adtr = new DateTimeRule(month, nthDayOfWeek, dayOfWeek, startMID, DateTimeRule::WALL_TIME);
704 // First day of week after day of month rule, for example,
705 // first Sunday after 15th day in the month
706 adtr = new DateTimeRule(month, dayOfMonth, dayOfWeek, true, startMID, DateTimeRule::WALL_TIME);
757 * Check if the DOW rule specified by month, weekInMonth and dayOfWeek is equivalent
760 static UBool isEquivalentDateRule(int32_t month, int32_t weekInMonth, int32_t dayOfWeek, const DateTimeRule *dtrule) {
761 if (month != dtrule->getRuleMonth() || dayOfWeek != dtrule->getRuleDayOfWeek()) {
777 if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 6
778 && weekInMonth == -1*((MONTHLENGTH[month]-ruleDOM+1)/7)) {
786 if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 0
787 && weekInMonth == -1*((MONTHLENGTH[month] - ruleDOM)/7 + 1)) {
813 int32_t month = -1, dom = 0, dow = 0;
824 month = rule->getRuleMonth();
838 dom = MONTHLENGTH[month] + 7 * (wim + 1);
844 month--;
845 month = month < UCAL_JANUARY ? UCAL_DECEMBER : month;
846 dom = MONTHLENGTH[month];
847 } else if (dom > MONTHLENGTH[month]) {
848 month++;
849 month = month > UCAL_DECEMBER ? UCAL_JANUARY : month;
865 modifiedRule = new DateTimeRule(month, dom, wallt, DateTimeRule::WALL_TIME);
867 modifiedRule = new DateTimeRule(month, dom, dow, (dtype == DateTimeRule::DOW_GEQ_DOM), wallt, DateTimeRule::WALL_TIME);
1193 VTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
1195 return tz->getOffset(era, year, month, day, dayOfWeek, millis, status);
1199 VTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
1202 return tz->getOffset(era, year, month, day, dayOfWeek, millis, monthLength, status);
1900 int32_t year, month, dom, dow, doy, mid;
1920 Grego::timeToFields(tzt.getTime() + fromOffset, year, month, dom, dow, doy, mid);
1921 int32_t weekInMonth = Grego::dayOfWeekInMonth(year, month, dom);
1936 && dstMonth == month
1965 dstMonth = month;
1987 && stdMonth == month
2016 stdMonth = month;
2221 int32_t month, int32_t dayOfMonth, UDate startTime, UDate untilTime,
2230 beginRRULE(writer, month, status);
2255 int32_t month, int32_t weekInMonth, int32_t dayOfWeek,
2264 beginRRULE(writer, month, status);
2291 int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
2300 month, (dayOfMonth + 6)/7, dayOfWeek, startTime, untilTime, status);
2304 } else if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - dayOfMonth)%7 == 6) {
2307 month, -1*((MONTHLENGTH[month] - dayOfMonth + 1)/7), dayOfWeek, startTime, untilTime, status);
2317 // Check if all days are in the same month
2322 // The start day is in previous month
2326 int32_t prevMonth = (month - 1) < 0 ? 11 : month - 1;
2339 } else if (dayOfMonth + 6 > MONTHLENGTH[month]) {
2340 // Note: This code does not actually work well in February. For now, days in month in
2342 int32_t nextMonthDays = dayOfMonth + 6 - MONTHLENGTH[month];
2345 int32_t nextMonth = (month + 1) > 11 ? 0 : month + 1;
2353 writeZonePropsByDOW_GEQ_DOM_sub(writer, month, startDay, dayOfWeek, currentMonthDays,
2366 VTimeZone::writeZonePropsByDOW_GEQ_DOM_sub(VTZWriter& writer, int32_t month, int32_t dayOfMonth,
2374 UBool isFeb = (month == UCAL_FEBRUARY);
2377 startDayNum = MONTHLENGTH[month] + dayOfMonth + 1;
2379 beginRRULE(writer, month, status);
2415 int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
2424 month, dayOfMonth/7, dayOfWeek, startTime, untilTime, status);
2425 } else if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - dayOfMonth)%7 == 0){
2428 month, -1*((MONTHLENGTH[month] - dayOfMonth)/7 + 1), dayOfWeek, startTime, untilTime, status);
2429 } else if (month == UCAL_FEBRUARY && dayOfMonth == 29) {
2436 month, dayOfMonth - 6, dayOfWeek, startTime, untilTime, status);
2567 VTimeZone::beginRRULE(VTZWriter& writer, int32_t month, UErrorCode& status) const {
2580 appendAsciiDigits(month + 1, 0, dstr);