/libcore/ojluni/src/test/java/time/test/java/time/temporal/ |
MockFieldNoValue.java | 62 import static java.time.temporal.ChronoUnit.MONTHS; 86 return MONTHS;
|
TestChronoUnit.java | 67 import static java.time.temporal.ChronoUnit.MONTHS; 182 assertEquals(MONTHS.between(start, end), expected); 187 assertEquals(MONTHS.between(end, start), -expected); 192 assertEquals(MONTHS.between(start.atTime(12, 30), end.atTime(12, 30)), expected); 198 assertEquals(MONTHS.between(start.atTime(12, 30), end.atTime(12, 31)), expected); 200 assertEquals(MONTHS.between(start.atTime(12, 30), end.atTime(12, 29)), expected); 206 assertEquals(MONTHS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(2))), expected); 213 assertEquals(MONTHS.between(start.atStartOfDay(ZoneOffset.ofHours(2)), end.atStartOfDay(ZoneOffset.ofHours(1))), expected); 215 assertEquals(MONTHS.between(start.atStartOfDay(ZoneOffset.ofHours(1)), end.atStartOfDay(ZoneOffset.ofHours(2))), expected);
|
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/ |
RelativeDateTimeFormatterTest.java | 52 {0.0, Direction.NEXT, RelativeUnit.MONTHS, "in 0 months"}, 53 {0.5, Direction.NEXT, RelativeUnit.MONTHS, "in 0.5 months"}, 54 {1.0, Direction.NEXT, RelativeUnit.MONTHS, "in 1 month"}, 55 {2.0, Direction.NEXT, RelativeUnit.MONTHS, "in 2 months"}, 81 {0.0, Direction.LAST, RelativeUnit.MONTHS, "0 months ago"}, 82 {0.5, Direction.LAST, RelativeUnit.MONTHS, "0.5 months ago"} [all...] |
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/ |
RelativeDateTimeFormatterTest.java | 51 {0.0, Direction.NEXT, RelativeUnit.MONTHS, "in 0 months"}, 52 {0.5, Direction.NEXT, RelativeUnit.MONTHS, "in 0.5 months"}, 53 {1.0, Direction.NEXT, RelativeUnit.MONTHS, "in 1 month"}, 54 {2.0, Direction.NEXT, RelativeUnit.MONTHS, "in 2 months"}, 80 {0.0, Direction.LAST, RelativeUnit.MONTHS, "0 months ago"}, 81 {0.5, Direction.LAST, RelativeUnit.MONTHS, "0.5 months ago"} [all...] |
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/serial/ |
TCKChronoUnitSerialization.java | 70 import static java.time.temporal.ChronoUnit.MONTHS; 102 {MONTHS},
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
ChronoPeriodImpl.java | 61 import static java.time.temporal.ChronoUnit.MONTHS; 109 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(YEARS, MONTHS, DAYS)); 120 * The number of months. 122 final int months; field in class:ChronoPeriodImpl 131 ChronoPeriodImpl(Chronology chrono, int years, int months, int days) { 135 this.months = months; 144 } else if (unit == ChronoUnit.MONTHS) { 145 return months; 166 return years == 0 && months == 0 && days == 0 396 int months = in.readInt(); local [all...] |
ChronoLocalDateImpl.java | 88 * For example, the Mayan calendar uses a system that bears no relation to years, months and days. 204 case MONTHS: return plusMonths(amountToAdd); 246 * Returns a copy of this date with the specified number of months added. 248 * This adds the specified period in months to the date. 249 * In some cases, adding months can cause the resulting date to become invalid. 255 * @param monthsToAdd the months to add, may be negative 256 * @return a date based on this one with the months added, not null 316 * Returns a copy of this date with the specified number of months subtracted. 318 * This subtracts the specified period in months to the date. 319 * In some cases, subtracting months can cause the resulting date to become invalid [all...] |
/libcore/ojluni/src/main/java/java/time/temporal/ |
ChronoField.java | 78 import static java.time.temporal.ChronoUnit.MONTHS; 386 * In the default ISO calendar system, this has values from 1 to 31 in most months. 394 DAY_OF_MONTH("DayOfMonth", DAYS, MONTHS, ValueRange.of(1, 28, 31), "day"), 438 ALIGNED_WEEK_OF_MONTH("AlignedWeekOfMonth", WEEKS, MONTHS, ValueRange.of(1, 4, 5)), 463 * Normally, this is a count of months starting from 1. 465 MONTH_OF_YEAR("MonthOfYear", MONTHS, YEARS, ValueRange.of(1, 12), "month"), 467 * The proleptic-month based, counting months sequentially from year 0. 469 * This field is the sequential count of months where the first month 471 * Later months have increasingly larger values. 472 * Earlier months have increasingly small values [all...] |
TemporalAdjusters.java | 68 import static java.time.temporal.ChronoUnit.MONTHS; 203 * temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS); 209 return (temporal) -> temporal.with(DAY_OF_MONTH, 1).plus(1, MONTHS);
|
ChronoUnit.java | 68 * For example, most non-ISO calendar systems define units of years, months and days, 140 MONTHS("Months", Duration.ofSeconds(31556952L / 12)), 143 * For the ISO calendar system, it is equal to 12 months. 147 * or months roughly equal to a year defined by the passage of the Earth around the Sun. 205 * Days vary due to daylight saving time, while months have different lengths. 221 * daylight saving time and months have different lengths.
|
WeekFields.java | 75 import static java.time.temporal.ChronoUnit.MONTHS; 468 * Then take the month-of-year, subtract one, and add the amount in months to the date. 685 return new ComputedDayOfField("WeekOfMonth", weekDef, WEEKS, MONTHS, WEEK_OF_MONTH_RANGE); [all...] |
/libcore/ojluni/src/test/java/time/tck/java/time/ |
TCKYearMonth.java | 72 import static java.time.temporal.ChronoUnit.MONTHS; 448 assertEquals(TEST_2008_06.isSupported(ChronoUnit.MONTHS), true); 485 {TEST_2008_06, TemporalQueries.precision(), ChronoUnit.MONTHS}, 712 long months = 20L + Integer.MAX_VALUE; local 713 assertEquals(test.plusMonths(months), YearMonth.of((int) (-40L + months / 12), 6 + (int) (months % 12))); 754 {YearMonth.of(1, 10), 1, ChronoUnit.MONTHS, YearMonth.of(1, 11), null}, 755 {YearMonth.of(1, 10), -12, ChronoUnit.MONTHS, YearMonth.of(0, 10), null}, 756 {YearMonth.of(1, 10), 0, ChronoUnit.MONTHS, YearMonth.of(1, 10), null} 927 long months = 20L + Integer.MAX_VALUE; local [all...] |
/libcore/luni/src/main/java/javax/xml/datatype/ |
DatatypeConstants.java | 132 * <p>A constant that represents the months field.</p> 134 public static final Field MONTHS = new Field("MONTHS", 1);
|
Duration.java | 34 * which consists of six fields (years, months, days, hours, 159 boolean monthSet = isSet(DatatypeConstants.MONTHS); 234 * Obtains the value of the MONTHS field as an integer value, 238 * that this method works on the MONTHS field. 240 * @return Months of this <code>Duration</code>. 243 return getFieldValueAsInt(DatatypeConstants.MONTHS); 383 * In case of YEARS, MONTHS, DAYS, HOURS, and MINUTES, the returned 388 * one of the six Field constants (YEARS,MONTHS,DAYS,HOURS, 394 * For YEARS, MONTHS, DAYS, HOURS, and MINUTES, this method 406 * one of the six Field constants (YEARS,MONTHS,DAYS,HOURS 897 BigInteger months = (BigInteger) getField(DatatypeConstants.MONTHS); local [all...] |
/libcore/luni/src/test/java/libcore/java/time/ |
InstantTest.java | 45 assertEquals(false, Instant.EPOCH.isSupported(ChronoUnit.MONTHS));
|
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/ |
TCKChronoUnit.java | 70 import static java.time.temporal.ChronoUnit.MONTHS; 107 {MONTHS, true, false, true}, 138 {MONTHS, LocalDate.of(2000, 1, 10), true, 1, LocalDate.of(2000, 2, 10)}, 153 {MONTHS, LocalTime.of(1, 2, 3, 400), false, 1, null},
|
TCKChronoField.java | 93 import static java.time.temporal.ChronoUnit.MONTHS; 126 {MONTH_OF_YEAR, MONTHS, YEARS}, 127 {DAY_OF_MONTH, DAYS, MONTHS},
|
/libcore/ojluni/src/test/java/time/test/java/time/chrono/ |
TestChronoLocalDate.java | 91 dates.add(date.minus(1, ChronoUnit.MONTHS)); 97 dates.add(date.plus(1, ChronoUnit.MONTHS)); 115 dates.add(date.minus(1, ChronoUnit.MONTHS)); 121 dates.add(date.plus(1, ChronoUnit.MONTHS));
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
TCKChronoPeriod.java | 61 import static java.time.temporal.ChronoUnit.MONTHS; 122 assertEquals(period.get(MONTHS), 2); 137 assertEquals(period.getUnits().get(1), MONTHS); 205 assertEquals(result, date.plus(14, MONTHS).plus(3, DAYS)); 223 assertEquals(result, date.minus(14, MONTHS).minus(3, DAYS));
|
/libcore/ojluni/src/main/java/java/time/ |
Period.java | 65 import static java.time.temporal.ChronoUnit.MONTHS; 96 * such as '2 years, 3 months and 4 days'. 98 * This class models a quantity or amount of time in terms of years, months and days. 114 * {@link ChronoUnit#MONTHS MONTHS} and {@link ChronoUnit#DAYS DAYS}. 150 Collections.unmodifiableList(Arrays.<TemporalUnit>asList(YEARS, MONTHS, DAYS)); 157 * The number of months. 159 private final int months; field in class:Period 170 * The months and days units will be zero. 180 * Obtains a {@code Period} representing a number of months 265 int months = 0; local 334 int months = parseNumber(text, monthMatch, negate); local 1070 int months = in.readInt(); local [all...] |
Month.java | 65 import static java.time.temporal.ChronoUnit.MONTHS; 85 * {@code Month} is an enum representing the 12 months of the year - 177 * {@code Month} is an enum representing the 12 months of the year. 389 * @param months the months to add, positive or negative 392 public Month plus(long months) { 393 int amount = (int) (months % 12); 398 * Returns the month-of-year that is the specified number of months before this one. 405 * @param months the months to subtract, positive or negativ [all...] |
YearMonth.java | 73 import static java.time.temporal.ChronoUnit.MONTHS; 366 * <li>{@code MONTHS} 386 return unit == MONTHS || unit == YEARS || unit == DECADES || unit == CENTURIES || unit == MILLENNIA || unit == ERAS; 757 * <li>{@code MONTHS} [all...] |
/external/toolchain-utils/ |
generate-waterfall-reports.py | 64 # be as MONTHS[9]. 65 MONTHS = [ 83 month_str = MONTHS[month] 131 mon = MONTHS[date/100%100]
|
/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/ |
BasicDurationFormat.java | 97 javax.xml.datatype.DatatypeConstants.MONTHS,
|
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/duration/ |
BasicDurationFormat.java | 95 javax.xml.datatype.DatatypeConstants.MONTHS,
|