Home | History | Annotate | Download | only in i18n

Lines Matching refs:month

77 // Month length for non-leap year
190 int32_t year, month, dom, dow, doy, mid;
191 Grego::timeToFields(time, year, month, dom, dow, doy, mid);
195 appendAsciiDigits(month + 1, 2, str);
230 int32_t year = 0, month = 0, day = 0, hour = 0, min = 0, sec = 0;
253 month = parseAsciiDigits(str, 4, 2, status) - 1; // 0-based
264 int32_t maxDayOfMonth = Grego::monthLength(year, month);
265 if (year < 0 || month < 0 || month > 11 || day < 1 || day > maxDayOfMonth ||
278 UDate time = Grego::fieldsToDay(year, month, day) * U_MILLIS_PER_DAY;
373 * month calculated by BYMONTH-1, or -1 when not found
376 * dom an array of day of month
380 static void parseRRULE(const UnicodeString& rrule, int32_t& month, int32_t& dow, int32_t& wim,
387 month = -1;
431 // Note: BYMONTH may contain multiple months, but only single month make sense for
436 month = parseAsciiDigits(value, 0, value.length(), status) - 1;
437 if (U_FAILURE(status) || month < 0 || month >= 12) {
483 // the last day in a month
539 int32_t month, dayOfWeek, nthDayOfWeek, dayOfMonth = 0;
544 parseRRULE(rrule, month, dayOfWeek, nthDayOfWeek, days, daysCount, until, status);
553 if (daysCount != 7 || month == -1 || dayOfWeek == 0) {
558 int32_t firstDay = 31; // max possible number of dates in a month
564 days[i] = MONTHLENGTH[month] + days[i] + 1;
590 if (month == -1 || dayOfWeek == 0 || daysCount == 0) {
595 // We can only support 7 continuous days starting from a day of month.
602 // checking across month boundary
604 int32_t earliestMonth = month;
608 dom = dom > 0 ? dom : MONTHLENGTH[month] + dom + 1;
642 // Check if the month is same or right next to the primary month
643 if (tmp_month != month) {
645 int32_t diff = tmp_month - month;
647 // Previous month
653 // Next month
659 } else if (tmp_month != month && tmp_month != anotherMonth) {
664 // If ealier month, go through days to find the earliest day
677 month = earliestMonth;
685 if (month == -1) {
686 // If BYMONTH is not set, use the month of DTSTART
687 month = startMonth;
704 // Day in month rule, for example, 15th day in the month
705 adtr = new DateTimeRule(month, dayOfMonth, startMID, DateTimeRule::WALL_TIME);
708 adtr = new DateTimeRule(month, nthDayOfWeek, dayOfWeek, startMID, DateTimeRule::WALL_TIME);
710 // First day of week after day of month rule, for example,
711 // first Sunday after 15th day in the month
712 adtr = new DateTimeRule(month, dayOfMonth, dayOfWeek, TRUE, startMID, DateTimeRule::WALL_TIME);
762 * Check if the DOW rule specified by month, weekInMonth and dayOfWeek is equivalent
765 static UBool isEquivalentDateRule(int32_t month, int32_t weekInMonth, int32_t dayOfWeek, const DateTimeRule *dtrule) {
766 if (month != dtrule->getRuleMonth() || dayOfWeek != dtrule->getRuleDayOfWeek()) {
782 if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 6
783 && weekInMonth == -1*((MONTHLENGTH[month]-ruleDOM+1)/7)) {
791 if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 0
792 && weekInMonth == -1*((MONTHLENGTH[month] - ruleDOM)/7 + 1)) {
815 int32_t month = -1, dom = 0, dow = 0;
826 month = rule->getRuleMonth();
840 dom = MONTHLENGTH[month] + 7 * (wim + 1);
846 month--;
847 month = month < UCAL_JANUARY ? UCAL_DECEMBER : month;
848 dom = MONTHLENGTH[month];
849 } else if (dom > MONTHLENGTH[month]) {
850 month++;
851 month = month > UCAL_DECEMBER ? UCAL_JANUARY : month;
867 modifiedRule = new DateTimeRule(month, dom, wallt, DateTimeRule::WALL_TIME);
869 modifiedRule = new DateTimeRule(month, dom, dow,
1184 VTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
1186 return tz->getOffset(era, year, month, day, dayOfWeek, millis, status);
1190 VTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
1193 return tz->getOffset(era, year, month, day, dayOfWeek, millis, monthLength, status);
1939 int32_t year, month, dom, dow, doy, mid;
1959 Grego::timeToFields(tzt.getTime() + fromOffset, year, month, dom, dow, doy, mid);
1960 int32_t weekInMonth = Grego::dayOfWeekInMonth(year, month, dom);
1975 && dstMonth == month
2004 dstMonth = month;
2026 && stdMonth == month
2055 stdMonth = month;
2260 int32_t month, int32_t dayOfMonth, UDate startTime, UDate untilTime,
2269 beginRRULE(writer, month, status);
2294 int32_t month, int32_t weekInMonth, int32_t dayOfWeek,
2303 beginRRULE(writer, month, status);
2330 int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
2339 month, (dayOfMonth + 6)/7, dayOfWeek, startTime, untilTime, status);
2343 } else if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - dayOfMonth)%7 == 6) {
2346 month, -1*((MONTHLENGTH[month] - dayOfMonth + 1)/7), dayOfWeek, startTime, untilTime, status);
2356 // Check if all days are in the same month
2361 // The start day is in previous month
2365 int32_t prevMonth = (month - 1) < 0 ? 11 : month - 1;
2378 } else if (dayOfMonth + 6 > MONTHLENGTH[month]) {
2379 // Note: This code does not actually work well in February. For now, days in month in
2381 int32_t nextMonthDays = dayOfMonth + 6 - MONTHLENGTH[month];
2384 month + 1) > 11 ? 0 : month + 1;
2392 writeZonePropsByDOW_GEQ_DOM_sub(writer, month, startDay, dayOfWeek, currentMonthDays,
2405 VTimeZone::writeZonePropsByDOW_GEQ_DOM_sub(VTZWriter& writer, int32_t month, int32_t dayOfMonth,
2413 UBool isFeb = (month == UCAL_FEBRUARY);
2416 startDayNum = MONTHLENGTH[month] + dayOfMonth + 1;
2418 beginRRULE(writer, month, status);
2454 int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
2463 month, dayOfMonth/7, dayOfWeek, startTime, untilTime, status);
2464 } else if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - dayOfMonth)%7 == 0){
2467 month, -1*((MONTHLENGTH[month] - dayOfMonth)/7 + 1), dayOfWeek, startTime, untilTime, status);
2468 } else if (month == UCAL_FEBRUARY && dayOfMonth == 29) {
2475 month, dayOfMonth - 6, dayOfWeek, startTime, untilTime, status);
2603 VTimeZone::beginRRULE(VTZWriter& writer, int32_t month, UErrorCode& status) const {
2616 appendAsciiDigits(month + 1, 0, dstr);