Home | History | Annotate | Download | only in i18n

Lines Matching refs:month

76 // Month length for non-leap year
189 int32_t year, month, dom, dow, doy, mid;
190 Grego::timeToFields(time, year, month, dom, dow, doy, mid);
194 appendAsciiDigits(month + 1, 2, str);
229 int32_t year = 0, month = 0, day = 0, hour = 0, min = 0, sec = 0;
252 month = parseAsciiDigits(str, 4, 2, status) - 1; // 0-based
263 int32_t maxDayOfMonth = Grego::monthLength(year, month);
264 if (year < 0 || month < 0 || month > 11 || day < 1 || day > maxDayOfMonth ||
277 UDate time = Grego::fieldsToDay(year, month, day) * U_MILLIS_PER_DAY;
372 * month calculated by BYMONTH-1, or -1 when not found
375 * dom an array of day of month
379 static void parseRRULE(const UnicodeString& rrule, int32_t& month, int32_t& dow, int32_t& wim,
386 month = -1;
430 // Note: BYMONTH may contain multiple months, but only single month make sense for
435 month = parseAsciiDigits(value, 0, value.length(), status) - 1;
436 if (U_FAILURE(status) || month < 0 || month >= 12) {
482 // the last day in a month
538 int32_t month, dayOfWeek, nthDayOfWeek, dayOfMonth = 0;
543 parseRRULE(rrule, month, dayOfWeek, nthDayOfWeek, days, daysCount, until, status);
552 if (daysCount != 7 || month == -1 || dayOfWeek == 0) {
557 int32_t firstDay = 31; // max possible number of dates in a month
563 days[i] = MONTHLENGTH[month] + days[i] + 1;
589 if (month == -1 || dayOfWeek == 0 || daysCount == 0) {
594 // We can only support 7 continuous days starting from a day of month.
601 // checking across month boundary
603 int32_t earliestMonth = month;
607 dom = dom > 0 ? dom : MONTHLENGTH[month] + dom + 1;
641 // Check if the month is same or right next to the primary month
642 if (tmp_month != month) {
644 int32_t diff = tmp_month - month;
646 // Previous month
652 // Next month
658 } else if (tmp_month != month && tmp_month != anotherMonth) {
663 // If ealier month, go through days to find the earliest day
676 month = earliestMonth;
684 if (month == -1) {
685 // If BYMONTH is not set, use the month of DTSTART
686 month = startMonth;
703 // Day in month rule, for example, 15th day in the month
704 adtr = new DateTimeRule(month, dayOfMonth, startMID, DateTimeRule::WALL_TIME);
707 adtr = new DateTimeRule(month, nthDayOfWeek, dayOfWeek, startMID, DateTimeRule::WALL_TIME);
709 // First day of week after day of month rule, for example,
710 // first Sunday after 15th day in the month
711 adtr = new DateTimeRule(month, dayOfMonth, dayOfWeek, TRUE, startMID, DateTimeRule::WALL_TIME);
761 * Check if the DOW rule specified by month, weekInMonth and dayOfWeek is equivalent
764 static UBool isEquivalentDateRule(int32_t month, int32_t weekInMonth, int32_t dayOfWeek, const DateTimeRule *dtrule) {
765 if (month != dtrule->getRuleMonth() || dayOfWeek != dtrule->getRuleDayOfWeek()) {
781 if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 6
782 && weekInMonth == -1*((MONTHLENGTH[month]-ruleDOM+1)/7)) {
790 if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 0
791 && weekInMonth == -1*((MONTHLENGTH[month] - ruleDOM)/7 + 1)) {
814 int32_t month = -1, dom = 0, dow = 0;
825 month = rule->getRuleMonth();
839 dom = MONTHLENGTH[month] + 7 * (wim + 1);
845 month--;
846 month = month < UCAL_JANUARY ? UCAL_DECEMBER : month;
847 dom = MONTHLENGTH[month];
848 } else if (dom > MONTHLENGTH[month]) {
849 month++;
850 month = month > UCAL_DECEMBER ? UCAL_JANUARY : month;
866 modifiedRule = new DateTimeRule(month, dom, wallt, DateTimeRule::WALL_TIME);
868 modifiedRule = new DateTimeRule(month, dom, dow,
1183 VTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
1185 return tz->getOffset(era, year, month, day, dayOfWeek, millis, status);
1189 VTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t day,
1192 return tz->getOffset(era, year, month, day, dayOfWeek, millis, monthLength, status);
1938 int32_t year, month, dom, dow, doy, mid;
1958 Grego::timeToFields(tzt.getTime() + fromOffset, year, month, dom, dow, doy, mid);
1959 int32_t weekInMonth = Grego::dayOfWeekInMonth(year, month, dom);
1974 && dstMonth == month
2003 dstMonth = month;
2025 && stdMonth == month
2054 stdMonth = month;
2249 int32_t month, int32_t dayOfMonth, UDate startTime, UDate untilTime,
2258 beginRRULE(writer, month, status);
2283 int32_t month, int32_t weekInMonth, int32_t dayOfWeek,
2292 beginRRULE(writer, month, status);
2319 int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
2328 month, (dayOfMonth + 6)/7, dayOfWeek, startTime, untilTime, status);
2332 } else if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - dayOfMonth)%7 == 6) {
2335 month, -1*((MONTHLENGTH[month] - dayOfMonth + 1)/7), dayOfWeek, startTime, untilTime, status);
2345 // Check if all days are in the same month
2350 // The start day is in previous month
2354 int32_t prevMonth = (month - 1) < 0 ? 11 : month - 1;
2367 } else if (dayOfMonth + 6 > MONTHLENGTH[month]) {
2368 // Note: This code does not actually work well in February. For now, days in month in
2370 int32_t nextMonthDays = dayOfMonth + 6 - MONTHLENGTH[month];
2373 int32_t nextMonth = (month + 1) > 11 ? 0 : month + 1;
2381 writeZonePropsByDOW_GEQ_DOM_sub(writer, month, startDay, dayOfWeek, currentMonthDays,
2394 VTimeZone::writeZonePropsByDOW_GEQ_DOM_sub(VTZWriter& writer, int32_t month, int32_t dayOfMonth,
2402 UBool isFeb = (month == UCAL_FEBRUARY);
2405 startDayNum = MONTHLENGTH[month] + dayOfMonth + 1;
2407 beginRRULE(writer, month, status);
2443 int32_t month, int32_t dayOfMonth, int32_t dayOfWeek,
2452 month, dayOfMonth/7, dayOfWeek, startTime, untilTime, status);
2453 } else if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - dayOfMonth)%7 == 0){
2456 month, -1*((MONTHLENGTH[month] - dayOfMonth)/7 + 1), dayOfWeek, startTime, untilTime, status);
2457 } else if (month == UCAL_FEBRUARY && dayOfMonth == 29) {
2464 month, dayOfMonth - 6, dayOfWeek, startTime, untilTime, status);
2592 VTimeZone::beginRRULE(VTZWriter& writer, int32_t month, UErrorCode& status) const {
2605 appendAsciiDigits(month + 1, 0, dstr);