Searched refs:months (Results 1 - 25 of 46) sorted by relevance

12

/openjdk9/jdk/src/java.base/share/classes/java/time/
H A DPeriod.java93 * such as '2 years, 3 months and 4 days'.
95 * This class models a quantity or amount of time in terms of years, months and days.
160 * The number of months.
162 private final int months; field in class:Period
173 * The months and days units will be zero.
183 * Obtains a {@code Period} representing a number of months.
185 * The resulting period will have the specified months.
188 * @param months the number of months, positive or negative
189 * @return the period of months, no
191 ofMonths(int months) argument
233 of(int years, int months, int days) argument
398 create(int years, int months, int days) argument
412 Period(int years, int months, int days) argument
580 withMonths(int months) argument
[all...]
H A DMonth.java85 * {@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.
382 * Returns the month-of-year that is the specified number of months after this one.
389 * @param months the months to add, positive or negative
392 public Month plus(long months) { argument
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 t
408 minus(long months) argument
[all...]
H A DLocalDate.java1200 * Returns a {@code LocalDate} with the specified number of months added.
1307 * Returns a copy of this {@code LocalDate} with the specified number of months added.
1309 * This method adds the specified amount to the months field in three steps:
1311 * <li>Add the input months to the month-of-year field</li>
1322 * @param monthsToAdd the months to add, may be negative
1323 * @return a {@code LocalDate} based on this date with the months added, not null
1477 * Returns a copy of this {@code LocalDate} with the specified number of months subtracted.
1479 * This method subtracts the specified amount from the months field in three steps:
1481 * <li>Subtract the input months from the month-of-year field</li>
1492 * @param monthsToSubtract the months t
[all...]
H A DOffsetDateTime.java1221 * Returns a copy of this {@code OffsetDateTime} with the specified number of months added.
1223 * This method adds the specified amount to the months field in three steps:
1225 * <li>Add the input months to the month-of-year field</li>
1236 * @param months the months to add, may be negative
1237 * @return an {@code OffsetDateTime} based on this date-time with the months added, not null
1240 public OffsetDateTime plusMonths(long months) { argument
1241 return with(dateTime.plusMonths(months), offset);
1410 * Returns a copy of this {@code OffsetDateTime} with the specified number of months subtracted.
1412 * This method subtracts the specified amount from the months fiel
1429 minusMonths(long months) argument
[all...]
/openjdk9/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/
H A DDurationYearMonthImpl.java62 * @param months of this <code>Duration</code>
65 * If years, months parameters are all <code>null</code>. Or if any
71 BigInteger months) {
73 super(isPositive, years, months, null, null, null, null);
95 final int months) {
99 wrap(months));
168 * @throws IllegalArgumentException If <code>lexicalRepresentation</code> is not a valid representation of a <code>Duration</code> expressed only in terms of years and months.
195 months = months.subtract(BigInteger.valueOf(12));
68 DurationYearMonthImpl( boolean isPositive, BigInteger years, BigInteger months) argument
92 DurationYearMonthImpl( final boolean isPositive, final int years, final int months) argument
H A DDurationImpl.java43 * which consists of six fields (years, months, days, hours,
156 protected BigInteger months; field in class:DurationImpl
198 && (months == null || months.signum() == 0)
223 * @param months of this <code>Duration</code>
230 * If years, months, days, hours, minutes and
237 BigInteger months,
244 this.months = months;
254 && months
234 DurationImpl( boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, BigDecimal seconds) argument
316 DurationImpl( final boolean isPositive, final int years, final int months, final int days, final int hours, final int minutes, final int seconds) argument
[all...]
H A DDatatypeFactoryImpl.java149 * specifying the <code>Duration</code> as isPositive, years, months, days, hours, minutes, seconds.</p>
159 * @param months of this <code>Duration</code>
171 * @see #newDuration(boolean isPositive, BigInteger years, BigInteger months, BigInteger days,
177 final BigInteger months,
186 months,
280 * @throws IllegalArgumentException If <code>lexicalRepresentation</code> is not a valid representation of a <code>Duration</code> expressed only in terms of years and months.
174 newDuration( final boolean isPositive, final BigInteger years, final BigInteger months, final BigInteger days, final BigInteger hours, final BigInteger minutes, final BigDecimal seconds) argument
H A DDurationDayTimeImpl.java158 months = null;
/openjdk9/jdk/src/java.base/share/classes/java/time/chrono/
H A DChronoPeriodImpl.java117 * The number of months.
119 final int months; field in class:ChronoPeriodImpl
128 ChronoPeriodImpl(Chronology chrono, int years, int months, int days) { argument
132 this.months = months;
142 return months;
163 return years == 0 && months == 0 && days == 0;
168 return years < 0 || months < 0 || days < 0;
178 Math.addExact(months, amount.months),
[all...]
H A DHijrahChronology.java185 * <td>The lengths of the 12 months of the year separated by whitespace.
836 * of 12 months.
873 int[] months = parseMonths((String) entry.getValue());
874 years.put(year, months);
939 int[] months = years.get(year);// must not be gaps
941 int length = months[month];
965 * Parses the 12 months lengths from a property value for a specific year.
969 * @throws IllegalArgumentException if the number of months is not 12
973 int[] months = new int[12];
976 throw new IllegalArgumentException("wrong number of months o
[all...]
H A DAbstractChronology.java390 * then adding the difference in months, then the difference in days.
407 * the difference in months, then the difference in weeks, then in days.
417 * years, months and weeks in {@code ALIGNED_DAY_OF_WEEK_IN_MONTH}.
419 * the years, months and weeks have been handled.
554 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1);
556 return date(y, 1, 1).plus(months, MONTHS).plus(days, DAYS);
584 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1);
587 return date(y, 1, 1).plus(months, MONTHS).plus(weeks, WEEKS).plus(days, DAYS);
602 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1);
605 return resolveAligned(date(y, 1, 1), months, week
649 resolveAligned(ChronoLocalDate base, long months, long weeks, long dow) argument
[all...]
H A DIsoChronology.java112 * <li>month-of-year - There are 12 months in an ISO year, numbered from 1 to 12.
528 * the difference in months, then the difference in days.
545 * the difference in months, then the difference in weeks, then in days.
555 * years, months and weeks in {@code ALIGNED_DAY_OF_WEEK_IN_MONTH}.
557 * the years, months and weeks have been handled.
639 long months = Math.subtractExact(fieldValues.remove(MONTH_OF_YEAR), 1);
641 return LocalDate.of(y, 1, 1).plusMonths(months).plusDays(days);
664 * Obtains a period for this chronology based on years, months and days.
667 * years, months and days. See {@link Period} for further details.
670 * @param months th
676 period(int years, int months, int days) argument
[all...]
H A DChronology.java690 * Obtains a period for this chronology based on years, months and days.
693 * years, months and days. All supplied chronologies use periods
694 * based on years, months and days, however the {@code ChronoPeriod} API
700 * Normalization, addition and subtraction derive the number of months
702 * months within a year is fixed, then the calculation approach for
706 * years, months and days, or where you want direct control, then
712 * @param months the number of years, may be negative
716 default ChronoPeriod period(int years, int months, int days) { argument
717 return new ChronoPeriodImpl(this, years, months, days);
/openjdk9/jdk/test/java/util/PluggableLocale/providersrc/
H A DDateFormatSymbolsProviderImpl.java80 String[] months = null; field in class:DateFormatSymbolsProviderImpl.FooDateFormatSymbols
114 if (months == null) {
115 months = super.getMonths();
116 for (int i = 0; i < months.length; i++) {
117 months[i] = months[i]+dialect;
120 return months;
128 months = newMonths;
/openjdk9/jaxp/src/java.xml/share/classes/javax/xml/datatype/
H A DDatatypeFactory.java285 * specifying the {@code Duration} as isPositive, years, months, days, hours, minutes, seconds.
297 * @param months of this {@code Duration}
306 * {@code Duration}: if all the fields (years, months, ...) are null or
313 final BigInteger months,
321 * specifying the {@code Duration} as isPositive, years, months, days, hours, minutes, seconds.
328 * @param months of this {@code Duration}
342 * BigInteger months,
351 final int months,
360 // months may not be set
361 BigInteger realMonths = (months !
310 newDuration( final boolean isPositive, final BigInteger years, final BigInteger months, final BigInteger days, final BigInteger hours, final BigInteger minutes, final BigDecimal seconds) argument
348 newDuration( final boolean isPositive, final int years, final int months, final int days, final int hours, final int minutes, final int seconds) argument
[all...]
H A DDuration.java41 * which consists of six fields (years, months, days, hours,
542 * determine the duration of months and years.
646 * "P1M" (1 month) * "12" = "P12M" (12 months)
665 * to days, or year to months, this will cause an
672 * and months fields.
680 * the months field.
703 * Converts the years and months fields into the days field
712 * <li>the years, months and days fields will be added to the {@link Calendar} object
724 * a very large value in the years or months fields.
728 * @return {@code Duration} of years and months o
[all...]
/openjdk9/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/DefaultFactoryWrapperTest/xmlwrapperprovider/xwp/
H A DDatatypeFactoryWrapper.java48 public Duration newDuration(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, argument
50 return defaultImpl.newDuration(isPositive, years, months, days, hours, minutes, seconds);
/openjdk9/jdk/test/java/util/Date/
H A DBug4955000.java78 int[] months = {
114 for (int j = 0; j < months.length; j++) {
120 int month = months[j];
/openjdk9/jdk/test/java/text/Format/DateFormat/
H A DIntlTestDateFormatSymbols.java99 final String[] months = en.getMonths();
100 fr.setMonths(months);
102 count = months.length;
108 if(! months[i].equals(months1[i])) {
/openjdk9/jdk/src/java.base/share/classes/java/text/
H A DDateFormatSymbols.java60 * months, the names of the days of the week, and the time zone data.
164 * of 13 strings (some calendars have 13 months), indexed by
168 String months[] = null; field in class:DateFormatSymbols
172 * 13 strings (some calendars have 13 months), indexed by
409 return Arrays.copyOf(months, months.length);
419 months = Arrays.copyOf(newMonths, newMonths.length);
646 hashCode = 11 * hashCode + Arrays.hashCode(months);
670 && Arrays.equals(months, that.months)
[all...]
/openjdk9/jaxp/test/javax/xml/jaxp/functional/javax/xml/datatype/ptests/
H A DDurationTest.java85 * Test for constructor Duration(boolean isPositive,int years,int months,
89 public void checkNumberDurationPos(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds) { argument
90 datatypeFactory.newDuration(isPositive, years, months, days, hours, minutes, seconds);
105 * Test for constructor Duration(boolean isPositive,int years,int months,
110 public void checkDurationNumberNeg(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds) { argument
111 datatypeFactory.newDuration(isPositive, years, months, days, hours, minutes, seconds);
128 * years,BigInteger months, BigInteger days,BigInteger hours,BigInteger
132 public void checkBigIntegerDurationPos(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, argument
134 datatypeFactory.newDuration(isPositive, years, months, days, hours, minutes, seconds);
148 * years,BigInteger months, BigIntege
153 checkBigIntegerDurationNeg(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, BigDecimal seconds) argument
376 checkDurationGetField(String lexRepresentation, BigInteger years, BigInteger months, BigInteger days, BigInteger hours, BigInteger minutes, BigDecimal seconds) argument
403 checkDurationToString(boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds, String lexical) argument
[all...]
/openjdk9/jaxp/test/javax/xml/jaxp/module/ServiceProviderTest/src/xmlprovider2/xp2/
H A DDatatypeFactoryImpl.java47 public Duration newDuration(boolean isPositive, BigInteger years, BigInteger months, BigInteger days, argument
/openjdk9/jdk/test/java/time/tck/java/time/chrono/
H A DCopticDate.java282 private CopticDate plusMonths(long months) { argument
283 if (months == 0) {
287 long calcEm = Math.addExact(curEm, months);
324 int months = (int) (totalMonths % 13); // safe
325 return Period.of(Math.toIntExact(years), months, days);
/openjdk9/jaxp/test/javax/xml/jaxp/unittest/datatype/
H A DDurationTest.java252 BigInteger.ZERO, // months
263 BigInteger.ZERO, // months
276 BigInteger.ZERO, // normalized months
287 BigInteger.ZERO, // normalized months
302 (BigInteger) TEST_VALUES[onValue + 2], // months
303 (BigInteger) NORM_VALUES[onValue + 2], // normalized months
324 BigInteger.ZERO, // months
325 BigInteger.ZERO, // normalized months
343 private void newDurationTester(boolean isPositive, boolean normalizedIsPositive, BigInteger years, BigInteger normalizedYears, BigInteger months, argument
358 Duration durationBigInteger = datatypeFactory.newDuration(isPositive, years, months, day
380 newDurationDayTimeTester(boolean isPositive, boolean normalizedIsPositive, BigInteger years, BigInteger normalizedYears, BigInteger months, BigInteger normalizedMonths, BigInteger days, BigInteger normalizedDays, BigInteger hours, BigInteger normalizedHours, BigInteger minutes, BigInteger normalizedMinutes, BigDecimal seconds, BigDecimal normalizedSeconds, long durationInMilliSeconds, long normalizedDurationInMilliSeconds, String lexicalRepresentation, String normalizedLexicalRepresentation) argument
418 durationAssertEquals(Duration duration, QName xmlSchemaType, boolean isPositive, int years, int months, int days, int hours, int minutes, int seconds, long milliseconds, String lexical) argument
[all...]
H A DDatatypeFactoryTest.java278 -2678400000L, 5270400000L, // 61 days, e.g. 2 months
373 -2678400000L, 5270400000L, // 61 days, e.g. 2 months
432 int months = duration.getMonths();
434 if (!xmlSchemaType.equals(DatatypeConstants.DURATION_DAYTIME) || years != 0 || months != 0) {
438 + ", years = " + years + ", months = " + months);
441 + " XMLSchemaType = " + xmlSchemaType + ", years = " + years + ", months = " + months);

Completed in 191 milliseconds

12