/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
D | TCKTemporalAdjusters.java | 112 for (Month month : Month.values()) { in test_firstDayOfMonth_nonLeap() 113 for (int i = 1; i <= month.length(false); i++) { in test_firstDayOfMonth_nonLeap() 114 LocalDate date = date(2007, month, i); in test_firstDayOfMonth_nonLeap() 117 assertEquals(test.getMonth(), month); in test_firstDayOfMonth_nonLeap() local 125 for (Month month : Month.values()) { in test_firstDayOfMonth_leap() 126 for (int i = 1; i <= month.length(true); i++) { in test_firstDayOfMonth_leap() 127 LocalDate date = date(2008, month, i); in test_firstDayOfMonth_leap() 130 assertEquals(test.getMonth(), month); in test_firstDayOfMonth_leap() local 146 for (Month month : Month.values()) { in test_lastDayOfMonth_nonLeap() 147 for (int i = 1; i <= month.length(false); i++) { in test_lastDayOfMonth_nonLeap() [all …]
|
/libcore/ojluni/src/main/java/sun/util/calendar/ |
D | BaseCalendar.java | 151 public Date setNormalizedDate(int normalizedYear, int month, int dayOfMonth) { in setNormalizedDate() argument 153 setMonth(month).setDayOfMonth(dayOfMonth); in setNormalizedDate() 196 int month = bdate.getMonth(); in validate() local 197 if (month < JANUARY || month > DECEMBER) { in validate() 201 if (d <= 0 || d > getMonthLength(bdate.getNormalizedYear(), month)) { in validate() 275 long month = bdate.getMonth(); in normalizeMonth() local 276 if (month <= 0) { in normalizeMonth() 277 long xm = 1L - month; in normalizeMonth() 279 month = 13 - (xm % 12); in normalizeMonth() 280 if (month == 13) { in normalizeMonth() [all …]
|
D | JulianCalendar.java | 148 public long getFixedDate(int jyear, int month, int dayOfMonth, BaseCalendar.Date cache) { in getFixedDate() argument 149 boolean isJan1 = month == JANUARY && dayOfMonth == 1; in getFixedDate() 156 return cache.getCachedJan1() + getDayOfYear(jyear, month, dayOfMonth) - 1; in getFixedDate() 168 if (month > 0) { in getFixedDate() 169 days += ((367 * (long) month) - 362) / 12; in getFixedDate() 171 days += CalendarUtils.floorDivide((367 * (long) month) - 362, 12); in getFixedDate() 173 if (month > FEBRUARY) { in getFixedDate() 199 int month = 12 * priorDays + 373; in getCalendarDateFromFixedDate() local 200 if (month > 0) { in getCalendarDateFromFixedDate() 201 month /= 367; in getCalendarDateFromFixedDate() [all …]
|
D | CalendarDate.java | 69 private int month; field in CalendarDate 166 return month; in getMonth() 169 public CalendarDate setMonth(int month) { in setMonth() argument 170 if (this.month != month) { in setMonth() 171 this.month = month; in setMonth() 179 month += n; in addMonth() 305 public CalendarDate setDate(int year, int month, int dayOfMonth) { in setDate() argument 307 setMonth(month); in setDate() 312 public CalendarDate addDate(int year, int month, int dayOfMonth) { in addDate() argument 314 addMonth(month); in addDate() [all …]
|
/libcore/ojluni/src/main/java/java/time/ |
D | MonthDay.java | 142 private final int month; field in MonthDay 212 public static MonthDay of(Month month, int dayOfMonth) { in of() argument 213 Objects.requireNonNull(month, "month"); in of() 215 if (dayOfMonth > month.maxLength()) { in of() 217 " is not valid for month " + month.name()); in of() 219 return new MonthDay(month.getValue(), dayOfMonth); in of() 238 public static MonthDay of(int month, int dayOfMonth) { in of() argument 239 return of(Month.of(month), dayOfMonth); in of() 314 private MonthDay(int month, int dayOfMonth) { in MonthDay() argument 315 this.month = month; in MonthDay() [all …]
|
D | YearMonth.java | 149 private final int month; field in YearMonth 207 public static YearMonth of(int year, Month month) { in of() argument 208 Objects.requireNonNull(month, "month"); in of() 209 return of(year, month.getValue()); in of() 220 public static YearMonth of(int year, int month) { in of() argument 222 MONTH_OF_YEAR.checkValidValue(month); in of() 223 return new YearMonth(year, month); in of() 300 private YearMonth(int year, int month) { in YearMonth() argument 302 this.month = month; in YearMonth() 314 if (year == newYear && month == newMonth) { in with() [all …]
|
D | LocalDate.java | 176 private final short month; field in LocalDate 244 public static LocalDate of(int year, Month month, int dayOfMonth) { in of() argument 246 Objects.requireNonNull(month, "month"); in of() 248 return create(year, month.getValue(), dayOfMonth); in of() 264 public static LocalDate of(int year, int month, int dayOfMonth) { in of() argument 266 MONTH_OF_YEAR.checkValidValue(month); in of() 268 return create(year, month, dayOfMonth); in of() 361 int month = (marchMonth0 + 2) % 12 + 1; in ofEpochDay() local 367 return new LocalDate(year, month, dom); in ofEpochDay() 438 private static LocalDate create(int year, int month, int dayOfMonth) { in create() argument [all …]
|
D | Month.java | 185 public static Month of(int month) { in of() argument 186 if (month < 1 || month > 12) { in of() 187 throw new DateTimeException("Invalid value for MonthOfYear: " + month); in of() 189 return ENUMS[month - 1]; in of()
|
D | LocalDateTime.java | 230 public static LocalDateTime of(int year, Month month, int dayOfMonth, int hour, int minute) { in of() argument 231 LocalDate date = LocalDate.of(year, month, dayOfMonth); in of() 255 …public static LocalDateTime of(int year, Month month, int dayOfMonth, int hour, int minute, int se… in of() argument 256 LocalDate date = LocalDate.of(year, month, dayOfMonth); in of() 280 …public static LocalDateTime of(int year, Month month, int dayOfMonth, int hour, int minute, int se… in of() argument 281 LocalDate date = LocalDate.of(year, month, dayOfMonth); in of() 305 public static LocalDateTime of(int year, int month, int dayOfMonth, int hour, int minute) { in of() argument 306 LocalDate date = LocalDate.of(year, month, dayOfMonth); in of() 330 …public static LocalDateTime of(int year, int month, int dayOfMonth, int hour, int minute, int seco… in of() argument 331 LocalDate date = LocalDate.of(year, month, dayOfMonth); in of() [all …]
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | CopticDate.java | 109 private final short month; field in CopticDate 128 int month = doy0 / 30 + 1; in ofEpochDay() local 130 return new CopticDate(prolepticYear, month, dom); in ofEpochDay() 133 private static CopticDate resolvePreviousValid(int prolepticYear, int month, int day) { in resolvePreviousValid() argument 134 if (month == 13 && day > 5) { in resolvePreviousValid() 137 return new CopticDate(prolepticYear, month, day); in resolvePreviousValid() 149 CopticDate(int prolepticYear, int month, int dayOfMonth) { in CopticDate() argument 150 CopticChronology.MOY_RANGE.checkValidValue(month, MONTH_OF_YEAR); in CopticDate() 152 if (month == 13) { in CopticDate() 160 this.month = (short) month; in CopticDate() [all …]
|
/libcore/ojluni/src/main/java/java/time/zone/ |
D | ZoneOffsetTransitionRule.java | 111 private final Month month; field in ZoneOffsetTransitionRule 173 Month month, in of() argument 182 Objects.requireNonNull(month, "month"); in of() 197 …return new ZoneOffsetTransitionRule(month, dayOfMonthIndicator, dayOfWeek, time, timeEndOfDay, tim… in of() 218 Month month, in ZoneOffsetTransitionRule() argument 228 this.month = month; in ZoneOffsetTransitionRule() 315 int b = (month.getValue() << 28) + // 4 bits in writeExternal() 347 Month month = Month.of(data >>> 28); in readExternal() local 360 …return ZoneOffsetTransitionRule.of(month, dom, dow, time, timeByte == 24, defn, std, before, after… in readExternal() 375 return month; in getMonth() [all …]
|
/libcore/ojluni/src/main/java/java/sql/ |
D | Date.java | 57 public Date(int year, int month, int day) { in Date() argument 58 super(year, month, day); in Date() 134 int month = Integer.parseInt(mm); in valueOf() local 137 if ((month >= 1 && month <= MAX_MONTH) && (day >= 1 && day <= MAX_DAY)) { in valueOf() 138 d = new Date(year - 1900, month - 1, day); in valueOf() 158 int month = super.getMonth() + 1; in toString() local 166 buf[5] = Character.forDigit(month/10,10); in toString() 167 buf[6] = Character.forDigit(month%10,10); in toString()
|
D | Timestamp.java | 87 public Timestamp(int year, int month, int date, in Timestamp() argument 89 super(year, month, date, hour, minute, second); in Timestamp() 176 int month = 0; in valueOf() local 226 month = Integer.parseInt(mm); in valueOf() 229 if ((month >= 1 && month <= MAX_MONTH) && (day >= 1 && day <= MAX_DAY)) { in valueOf() 263 return new Timestamp(year - 1900, month - 1, day, hour, minute, second, a_nanos); in valueOf() 277 int month = super.getMonth() + 1; in toString() local 301 if (month < 10) { in toString() 302 monthString = "0" + month; in toString() 304 monthString = Integer.toString(month); in toString()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Date.java | 198 public Date(int year, int month, int date) { in Date() argument 199 this(year, month, date, 0, 0, 0); in Date() 220 public Date(int year, int month, int date, int hrs, int min) { in Date() argument 221 this(year, month, date, hrs, min, 0); in Date() 243 public Date(int year, int month, int date, int hrs, int min, int sec) { in Date() argument 246 if (month >= 12) { in Date() 247 y += month / 12; in Date() 248 month %= 12; in Date() 249 } else if (month < 0) { in Date() 250 y += CalendarUtils.floorDivide(month, 12); in Date() [all …]
|
D | GregorianCalendar.java | 641 public GregorianCalendar(int year, int month, int dayOfMonth) { in GregorianCalendar() argument 642 this(year, month, dayOfMonth, 0, 0, 0, 0); in GregorianCalendar() 658 public GregorianCalendar(int year, int month, int dayOfMonth, int hourOfDay, in GregorianCalendar() argument 660 this(year, month, dayOfMonth, hourOfDay, minute, 0, 0); in GregorianCalendar() 678 public GregorianCalendar(int year, int month, int dayOfMonth, int hourOfDay, in GregorianCalendar() argument 680 this(year, month, dayOfMonth, hourOfDay, minute, second, 0); in GregorianCalendar() 699 GregorianCalendar(int year, int month, int dayOfMonth, in GregorianCalendar() argument 704 this.set(MONTH, month); in GregorianCalendar() 958 int month = internalGet(MONTH) + amount; local 962 if (month >= 0) { [all …]
|
/libcore/luni/src/test/java/libcore/javax/xml/datatype/ |
D | XMLGregorianCalendarTest.java | 74 private int month; field in XMLGregorianCalendarTest.XMLGregorianCalendarImpl 85 year = month = day = hour = minute = second = millisecond = timezoneOffset = 0; in clear() 91 year = month = day = hour = minute = second = millisecond = timezoneOffset = 0; in reset() 106 public void setMonth(int month) { in setMonth() argument 107 this.month = month; in setMonth() 162 return month; in getMonth() 198 if (month != rhs.getMonth()) return month - rhs.getMonth(); in compare()
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | HijrahChronology.java | 383 public HijrahDate date(Era era, int yearOfEra, int month, int dayOfMonth) { in date() argument 384 return date(prolepticYear(era, yearOfEra), month, dayOfMonth); in date() 398 public HijrahDate date(int prolepticYear, int month, int dayOfMonth) { in date() argument 399 return HijrahDate.of(this, prolepticYear, month, dayOfMonth); in date() 584 void checkValidMonth(int month) { in checkValidMonth() argument 585 if (month < 1 || month > 12) { in checkValidMonth() 586 throw new DateTimeException("Invalid Hijrah month: " + month); in checkValidMonth() 606 int month = epochMonthToMonth(epochMonth); in getHijrahDateInfo() local 612 dateInfo[1] = month + 1; // change to 1-based. in getHijrahDateInfo() 646 int getDayOfYear(int prolepticYear, int month) { in getDayOfYear() argument [all …]
|
D | IsoChronology.java | 193 public LocalDate date(Era era, int yearOfEra, int month, int dayOfMonth) { in date() argument 194 return date(prolepticYear(era, yearOfEra), month, dayOfMonth); in date() 210 public LocalDate date(int prolepticYear, int month, int dayOfMonth) { in date() argument 211 return LocalDate.of(prolepticYear, month, dayOfMonth); in date() 292 public long epochSecond(int prolepticYear, int month, int dayOfMonth, in epochSecond() argument 295 MONTH_OF_YEAR.checkValidValue(month); in epochSecond() 302 int dom = numberOfDaysOfMonth(prolepticYear, month); in epochSecond() 307 … throw new DateTimeException("Invalid date '" + Month.of(month).name() + " " + dayOfMonth + "'"); in epochSecond() 320 totalDays += (367 * month - 362) / 12; in epochSecond() 322 if (month > 2) { in epochSecond() [all …]
|
D | Chronology.java | 316 default ChronoLocalDate date(Era era, int yearOfEra, int month, int dayOfMonth) { in date() argument 317 return date(prolepticYear(era, yearOfEra), month, dayOfMonth); in date() 330 ChronoLocalDate date(int prolepticYear, int month, int dayOfMonth); in date() argument 739 public default long epochSecond(int prolepticYear, int month, int dayOfMonth, in epochSecond() argument 745 … long daysInSec = Math.multiplyExact(date(prolepticYear, month, dayOfMonth).toEpochDay(), 86400); in epochSecond() 768 public default long epochSecond(Era era, int yearOfEra, int month, int dayOfMonth, in epochSecond() argument 771 …return epochSecond(prolepticYear(era, yearOfEra), month, dayOfMonth, hour, minute, second, zoneOff… in epochSecond()
|
/libcore/ojluni/src/test/java/util/GregorianCalendar/ |
D | GregorianCalendarTest.java | 105 for (long month = Integer.MIN_VALUE; in testGregorianCalendar() 106 runrun && month <= Integer.MAX_VALUE; month += delta) { in testGregorianCalendar() 107 checkTimes(gc, 1900, month, 1, in testGregorianCalendar() 188 static void checkTimes(GregorianCalendar gc, long year, long month, long dayOfMonth, in checkTimes() argument 191 gc.set((int)year, (int)month, (int)dayOfMonth, (int)hourOfDay, (int)minutes, (int)seconds); in checkTimes() 193 Date date = new Date((int)year - 1900, (int)month, (int)dayOfMonth, in checkTimes() 198 +"year="+year+", month="+month+", dayOfMonth="+dayOfMonth in checkTimes()
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
D | TestJapaneseChronology.java | 180 …public void test_transitions(JapaneseEra era, int yearOfEra, int month, int dayOfMonth, int gregor… in test_transitions() argument 183 JapaneseDate jdate1 = JapaneseDate.of(era, yearOfEra, month, dayOfMonth); in test_transitions() 184 JapaneseDate jdate2 = JapaneseDate.of(gregorianYear, month, dayOfMonth); in test_transitions() 198 …public void test_firstDayOfEra(JapaneseEra era, int yearOfEra, int dayOfYear, int month, int dayOf… in test_firstDayOfEra() argument 200 JapaneseDate date2 = JAPANESE.date(era, yearOfEra, month, dayOfMonth); in test_firstDayOfEra() 205 public void test_invalidDate(JapaneseEra era, int yearOfEra, int month, int dayOfMonth) { in test_invalidDate() argument 206 JapaneseDate jdate = JapaneseDate.of(era, yearOfEra, month, dayOfMonth); in test_invalidDate() 207 …System.out.printf("No DateTimeException with %s %d.%02d.%02d%n", era, yearOfEra, month, dayOfMonth… in test_invalidDate()
|
/libcore/support/src/test/java/tests/support/ |
D | Support_TimeZone.java | 56 int month = cal.get(Calendar.MONTH); in inDaylightTime() local 58 if (month > 4 && month < 10) { in inDaylightTime()
|
/libcore/luni/src/main/java/javax/xml/datatype/ |
D | DatatypeFactory.java | 623 final BigInteger month) { in newDurationYearMonth() argument 628 month, in newDurationYearMonth() 656 final int month) { in newDurationYearMonth() argument 657 return newDuration(isPositive, year, month, in newDurationYearMonth() 790 final int month, in newXMLGregorianCalendar() argument 826 final int month, in newXMLGregorianCalendar() argument 853 month, in newXMLGregorianCalendar() 888 final int month, in newXMLGregorianCalendarDate() argument 894 month, in newXMLGregorianCalendarDate()
|
/libcore/ojluni/annotations/hiddenapi/sun/util/calendar/ |
D | BaseCalendar.java | 59 private int getMonthLength(int year, int month) { in getMonthLength() argument 67 final long getDayOfYear(int year, int month, int dayOfMonth) { in getDayOfYear() argument 76 int year, int month, int dayOfMonth, sun.util.calendar.BaseCalendar.Date cache) { in getFixedDate() argument 184 int normalizedYear, int month, int dayOfMonth) { in setNormalizedDate() argument
|
/libcore/ojluni/src/main/java/java/util/zip/ |
D | ZipUtils.java | 91 int month = (int) ((dtime >> 21) & 0x0f); in dosToJavaTime() local 97 if (month > 0 && month < 13 && day > 0 && hour < 24 && minute < 60 && second < 60) { in dosToJavaTime() 99 LocalDateTime ldt = LocalDateTime.of(year, month, day, hour, minute, second); in dosToJavaTime() 106 return overflowDosToJavaTime(year, month, day, hour, minute, second); in dosToJavaTime() 113 private static long overflowDosToJavaTime(int year, int month, int day, in overflowDosToJavaTime() argument 115 return new Date(year - 1900, month - 1, day, hour, minute, second).getTime(); in overflowDosToJavaTime()
|