Home | History | Annotate | Download | only in util

Lines Matching defs:month

81     public int getOffset(int era, int year, int month, int day, int dayOfWeek,
83 return tz.getOffset(era, year, month, day, dayOfWeek, milliseconds);
420 // Month length in regular year
847 int month = ruleFields[0];
857 if (ruleFields.length != 10 || month == -1 || dayOfWeek == 0) {
862 int firstDay = 31; // max possible number of dates in a month
869 days[i] = days[i] > 0 ? days[i] : MONTHLENGTH[month] + days[i] + 1;
892 if (month == -1 || dayOfWeek == 0 || dayOfMonth == 0) {
897 // We can only support 7 continuous days starting from a day of month.
904 // checking across month boundary
906 int earliestMonth = month;
911 dom = dom > 0 ? dom : MONTHLENGTH[month] + dom + 1;
941 // Check if the month is same or right next to the primary month
942 if (fields[0] != month) {
944 int diff = fields[0] - month;
946 // Previous month
952 // Next month
958 } else if (fields[0] != month && fields[0] != anotherMonth) {
963 // If ealier month, go through days to find the earliest day
977 month = earliestMonth;
984 if (month == -1) {
985 // If MYMONTH is not set, use the month of DTSTART
986 month = dfields[1];
1003 // Day in month rule, for example, 15th day in the month
1004 adtr = new DateTimeRule(month, dayOfMonth, timeInDay, DateTimeRule.WALL_TIME);
1007 adtr = new DateTimeRule(month, nthDayOfWeek, dayOfWeek, timeInDay, DateTimeRule.WALL_TIME);
1009 // First day of week after day of month rule, for example,
1010 // first Sunday after 15th day in the month
1011 adtr = new DateTimeRule(month, dayOfMonth, dayOfWeek, true, timeInDay, DateTimeRule.WALL_TIME);
1025 * int[0] month calculated by BYMONTH - 1, or -1 when not found
1028 * int[i >= 3] day of month, which could be multiple values, or 0 when not found
1038 int month = -1;
1077 // Note: BYMONTH may contain multiple months, but only single month make sense for
1084 month = Integer.parseInt(value) - 1;
1085 if (month < 0 || month >= 12) {
1145 // the last day in a month
1181 results[0] = month;
1457 * Check if the DOW rule specified by month, weekInMonth and dayOfWeek is equivalent
1460 private static boolean isEquivalentDateRule(int month, int weekInMonth, int dayOfWeek, DateTimeRule dtrule) {
1461 if (month != dtrule.getRuleMonth() || dayOfWeek != dtrule.getRuleDayOfWeek()) {
1477 if (month != Calendar.FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 6
1478 && weekInMonth == -1*((MONTHLENGTH[month]-ruleDOM+1)/7)) {
1486 if (month != Calendar.FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 0
1487 && weekInMonth == -1*((MONTHLENGTH[month] - ruleDOM)/7 + 1)) {
1513 int month, int dayOfMonth, long startTime, long untilTime) throws IOException {
1516 beginRRULE(writer, month);
1533 int month, int weekInMonth, int dayOfWeek, long startTime, long untilTime) throws IOException {
1536 beginRRULE(writer, month);
1554 int month, int dayOfMonth, int dayOfWeek, long startTime, long untilTime) throws IOException {
1559 month, (dayOfMonth + 6)/7, dayOfWeek, startTime, untilTime);
1560 } else if (month != Calendar.FEBRUARY && (MONTHLENGTH[month] - dayOfMonth)%7 == 6) {
1563 month, -1*((MONTHLENGTH[month] - dayOfMonth + 1)/7), dayOfWeek, startTime, untilTime);
1568 // Check if all days are in the same month
1573 // The start day is in previous month
1577 int prevMonth = (month - 1) < 0 ? 11 : month - 1;
1586 } else if (dayOfMonth + 6 > MONTHLENGTH[month]) {
1587 // Note: This code does not actually work well in February. For now, days in month in
1589 int nextMonthDays = dayOfMonth + 6 - MONTHLENGTH[month];
1592 int nextMonth = (month + 1) > 11 ? 0 : month + 1;
1596 writeZonePropsByDOW_GEQ_DOM_sub(writer, month, startDay, dayOfWeek, currentMonthDays, untilTime, fromOffset);
1604 private static void writeZonePropsByDOW_GEQ_DOM_sub(Writer writer, int month,
1608 boolean isFeb = (month == Calendar.FEBRUARY);
1611 startDayNum = MONTHLENGTH[month] + dayOfMonth + 1;
1613 beginRRULE(writer, month);
1637 int month, int dayOfMonth, int dayOfWeek, long startTime, long untilTime) throws IOException {
1642 month, dayOfMonth/7, dayOfWeek, startTime, untilTime);
1643 } else if (monthmonth] - dayOfMonth)%7 == 0){
1646 month, -1*((MONTHLENGTH[month] - dayOfMonth)/7 + 1), dayOfWeek, startTime, untilTime);
1647 } else if (month == Calendar.FEBRUARY && dayOfMonth == 29) {
1654 month, dayOfMonth - 6, dayOfWeek, startTime, untilTime);
1711 int month = -1, dom = 0, dow = 0, dtype = -1;
1721 month = rule.getRuleMonth();
1735 dom = MONTHLENGTH[month] + 7 * (wim + 1);
1742 month--;
1743 month = month < Calendar.JANUARY ? Calendar.DECEMBER : month;
1744 dom = MONTHLENGTH[month];
1745 } else if (dom > MONTHLENGTH[month]) {
1746 month++;
1747 month = month > Calendar.DECEMBER ? Calendar.JANUARY : month;
1763 modifiedRule = new DateTimeRule(month, dom, wallt, DateTimeRule.WALL_TIME);
1765 modifiedRule = new DateTimeRule(month, dom, dow,
1827 private static void beginRRULE(Writer writer, int month) throws IOException {
1836 writer.write(Integer.toString(month + 1));
1924 int year = 0, month = 0, day = 0, hour = 0, min = 0, sec = 0;
1952 month = Integer.parseInt(str.substring(4, 6)) - 1; // 0-based
1962 int maxDayOfMonth = Grego.monthLength(year, month);
1963 if (year < 0 || month < 0 || month > 11 || day < 1 || day > maxDayOfMonth ||
1975 long time = Grego.fieldsToDay(year, month, day) * Grego.MILLIS_PER_DAY;