Lines Matching refs:month
79 // Month length for non-leap year
192 int32_t year, month, dom, dow, doy, mid;
193 Grego::timeToFields(time, year, month, dom, dow, doy, mid);
197 appendAsciiDigits(month + 1, 2, str);
232 int32_t year = 0, month = 0, day = 0, hour = 0, min = 0, sec = 0;
255 month = parseAsciiDigits(str, 4, 2, status) - 1; // 0-based
266 int32_t maxDayOfMonth = Grego::monthLength(year, month);
267 if (year < 0 || month < 0 || month > 11 || day < 1 || day > maxDayOfMonth ||
280 UDate time = Grego::fieldsToDay(year, month, day) * U_MILLIS_PER_DAY;
375 * month calculated by BYMONTH-1, or -1 when not found
378 * dom an array of day of month
382 static void parseRRULE(const UnicodeString& rrule, int32_t& month, int32_t& dow, int32_t& wim,
389 month = -1;
433 // Note: BYMONTH may contain multiple months, but only single month make sense for
438 month = parseAsciiDigits(value, 0, value.length(), status) - 1;
439 if (U_FAILURE(status) || month < 0 || month >= 12) {
485 // the last day in a month
541 int32_t month, dayOfWeek, nthDayOfWeek, dayOfMonth = 0;
546 parseRRULE(rrule, month, dayOfWeek, nthDayOfWeek, days, daysCount, until, status);
555 if (daysCount != 7 || month == -1 || dayOfWeek == 0) {
560 int32_t firstDay = 31; // max possible number of dates in a month
566 days[i] = MONTHLENGTH[month] + days[i] + 1;
592 if (month == -1 || dayOfWeek == 0 || daysCount == 0) {
597 // We can only support 7 continuous days starting from a day of month.
604 // checking across month boundary
606 int32_t earliestMonth = month;
610 dom = dom > 0 ? dom : MONTHLENGTH[month] + dom + 1;
644 // Check if the month is same or right next to the primary month
645 if (tmp_month != month) {
647 int32_t diff = tmp_month - month;
649 // Previous month
655 // Next month
661 } else if (tmp_month != month && tmp_month != anotherMonth) {
666 // If ealier month, go through days to find the earliest day
679 month = earliestMonth;
687 if (month == -1) {
688 // If BYMONTH is not set, use the month of DTSTART
689 month = startMonth;
706 // Day in month rule, for example, 15th day in the month
707 adtr = new DateTimeRule(month, dayOfMonth, startMID, DateTimeRule::WALL_TIME);
710 adtr = new DateTimeRule(month, nthDayOfWeek, dayOfWeek, startMID, DateTimeRule::WALL_TIME);
712 // First day of week after day of month rule, for example,
713 // first Sunday after 15th day in the month
714 adtr = new DateTimeRule(month, dayOfMonth, dayOfWeek, TRUE, startMID, DateTimeRule::WALL_TIME);
764 * Check if the DOW rule specified by month, weekInMonth and dayOfWeek is equivalent
767 static UBool isEquivalentDateRule(int32_t month, int32_t weekInMonth, int32_t dayOfWeek, const DateTimeRule *dtrule) {
768 if (month != dtrule->getRuleMonth() || dayOfWeek != dtrule->getRuleDayOfWeek()) {
784 if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 6
785 && weekInMonth == -1*((MONTHLENGTH[month]-ruleDOM+1)/7)) {
793 if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 0
794 && weekInMonth == -1*((MONTHLENGTH[month] - ruleDOM)/7 + 1)) {
817 int32_t month = -1, dom = 0, dow = 0;
828 month = rule->getRuleMonth();
842 dom = MONTHLENGTH[month] + 7 * (wim + 1);
848 month--;
849 month = month < UCAL_JANUARY ? UCAL_DECEMBER : month;
850 dom = MONTHLENGTH[month];
851 } else if (dom > MONTHLENGTH[month]) {
852 month++;
853 month = month > UCAL_DECEMBER ? UCAL_JANUARY : month;
869 modifiedRule = new DateTimeRule(month, dom, wallt, DateTimeRule::WALL_TIME);
871 modifiedRule = new DateTimeRule(month, dom, dow,
1186 VTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
1188 return tz->getOffset(era, year, month, day, dayOfWeek, millis, status);
1192 VTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
1195 return tz->getOffset(era, year, month, day, dayOfWeek, millis, monthLength, status);
1931 int32_t year, month, dom, dow, doy, mid;
1951 Grego::timeToFields(tzt.getTime() + fromOffset, year, month, dom, dow, doy, mid);
1952 int32_t weekInMonth = Grego::dayOfWeekInMonth(year, month, dom);
1967 && dstMonth == month
1996 dstMonth = month;
2018 && stdMonth == month
2047 stdMonth = month;
2252 int32_t month, int32_t dayOfMonth, UDate startTime, UDate untilTime,
2261 beginRRULE(writer, month, status);
2286 int32_t month, int32_t weekInMonth, int32_t dayOfWeek,
2295 beginRRULE(writer, month, status);
2322 int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
2331 month, (dayOfMonth + 6)/7, dayOfWeek, startTime, untilTime, status);
2335 } else if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - dayOfMonth)%7 == 6) {
2338 month, -1*((MONTHLENGTH[month] - dayOfMonth + 1)/7), dayOfWeek, startTime, untilTime, status);
2348 // Check if all days are in the same month
2353 // The start day is in previous month
2357 int32_t prevMonth = (month - 1) < 0 ? 11 : month - 1;
2370 } else if (dayOfMonth + 6 > MONTHLENGTH[month]) {
2371 // Note: This code does not actually work well in February. For now, days in month in
2373 int32_t nextMonthDays = dayOfMonth + 6 - MONTHLENGTH[month];
2376 int32_t nextMonth = (month + 1) > 11 ? 0 : month + 1;
2384 writeZonePropsByDOW_GEQ_DOM_sub(writer, month, startDay, dayOfWeek, currentMonthDays,
2397 VTimeZone::writeZonePropsByDOW_GEQ_DOM_sub(VTZWriter& writer, int32_t month, int32_t dayOfMonth,
2405 UBool isFeb = (month == UCAL_FEBRUARY);
2408 startDayNum = MONTHLENGTH[month] + dayOfMonth + 1;
2410 beginRRULE(writer, month, status);
2446 int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
2455 month, dayOfMonth/7, dayOfWeek, startTime, untilTime, status);
2456 } else if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - dayOfMonth)%7 == 0){
2459 month, -1*((MONTHLENGTH[month] - dayOfMonth)/7 + 1), dayOfWeek, startTime, untilTime, status);
2460 } else if (month == UCAL_FEBRUARY && dayOfMonth == 29) {
2467 month, dayOfMonth - 6, dayOfWeek, startTime, untilTime, status);
2595 VTimeZone::beginRRULE(VTZWriter& writer, int32_t month, UErrorCode& status) const {
2608 appendAsciiDigits(month + 1, 0, dstr);