Home
last modified time | relevance | path

Searched refs:YearMonth (Results 1 – 16 of 16) sorted by relevance

/libcore/ojluni/src/test/java/time/tck/java/time/
DTCKYearMonth.java91 import java.time.YearMonth;
126 private static YearMonth TEST_2008_06;
130 TEST_2008_06 = YearMonth.of(2008, 6); in setUp()
163 void check(YearMonth test, int y, int m) { in check()
173 YearMonth expected = YearMonth.now(Clock.systemDefaultZone()); in now()
174 YearMonth test = YearMonth.now(); in now()
179 expected = YearMonth.now(Clock.systemDefaultZone()); in now()
180 test = YearMonth.now(); in now()
190 YearMonth.now((ZoneId) null); in now_ZoneId_nullZoneId()
196 YearMonth expected = YearMonth.now(Clock.system(zone)); in now_ZoneId()
[all …]
DTCKYear.java88 import java.time.YearMonth;
945 YearMonth end = start.plusYears(2).atMonth(Month.APRIL); in test_until_convertedType()
991 assertEquals(test.atMonth(Month.JUNE), YearMonth.of(2008, 6)); in test_atMonth()
1006 assertEquals(test.atMonth(6), YearMonth.of(2008, 6)); in test_atMonth_int()
DTCKMonthDay.java79 import java.time.YearMonth;
785 if (YearMonth.of(leapYear, i).isValidDay(j)) { in test_hashCode_unique()
/libcore/ojluni/src/main/java/java/time/
DYearMonth.java125 public final class YearMonth class
126 implements Temporal, TemporalAdjuster, Comparable<YearMonth>, Serializable {
162 public static YearMonth now() { in now()
178 public static YearMonth now(ZoneId zone) { in now()
192 public static YearMonth now(Clock clock) { in now()
194 return YearMonth.of(now.getYear(), now.getMonth()); in now()
206 public static YearMonth of(int year, Month month) { in of()
219 public static YearMonth of(int year, int month) { in of()
222 return new YearMonth(year, month); in of()
245 public static YearMonth from(TemporalAccessor temporal) { in from()
[all …]
DSer.java202 ((YearMonth) object).writeExternal(out); in writeInternal()
267 case YEAR_MONTH_TYPE: return YearMonth.readExternal(in); in readInternal()
DYear.java968 public YearMonth atMonth(Month month) { in atMonth()
969 return YearMonth.of(year, month); in atMonth()
987 public YearMonth atMonth(int month) { in atMonth()
988 return YearMonth.of(year, month); in atMonth()
/libcore/luni/src/test/java/libcore/java/time/
DYearMonthTest.java22 import java.time.YearMonth;
41 YearMonth ym = YearMonth.of(2000, Month.JANUARY); in test_with_TemporalField_long()
43 YearMonth bceYm = YearMonth.of(-1999, Month.JANUARY); in test_with_TemporalField_long()
45 assertEquals(YearMonth.of(1000, Month.JANUARY), ym.with(ChronoField.YEAR, 1000)); in test_with_TemporalField_long()
46 assertEquals(YearMonth.of(-1, Month.JANUARY), ym.with(ChronoField.YEAR, -1)); in test_with_TemporalField_long()
47 assertEquals(YearMonth.of(2000, Month.FEBRUARY), ym.with(ChronoField.MONTH_OF_YEAR, 2)); in test_with_TemporalField_long()
48 assertEquals(YearMonth.of(-1999, Month.DECEMBER), in test_with_TemporalField_long()
55 assertEquals(YearMonth.of(1, Month.JANUARY), ym.with(ChronoField.YEAR_OF_ERA, 1)); in test_with_TemporalField_long()
57 assertEquals(YearMonth.of(0, Month.JANUARY), bceYm.with(ChronoField.YEAR_OF_ERA, 1)); in test_with_TemporalField_long()
58 assertEquals(YearMonth.of(0, Month.JANUARY), ym.with(ChronoField.PROLEPTIC_MONTH, 0)); in test_with_TemporalField_long()
[all …]
DDurationTest.java25 import java.time.YearMonth;
133 YearMonth.now(), in test_addTo_subtractFrom_unsupported()
/libcore/ojluni/src/test/java/time/tck/java/time/serial/
DTCKYearMonthSerialization.java69 import java.time.YearMonth;
77 private YearMonth TEST_2008_06;
81 TEST_2008_06 = YearMonth.of(2008, 6); in setUp()
100 assertSerializedBySer(YearMonth.of(2012, 9), bytes); in test_serialization_format()
105 assertNotSerializable(YearMonth.class); in test_invalid_serialform()
/libcore/ojluni/src/test/java/time/test/java/time/
DTestYearMonth.java62 import java.time.YearMonth;
75 assertImmutable(YearMonth.class); in test_immutable()
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestDateTimeFormatter.java78 import java.time.YearMonth;
114 assertGoodErrorDate(YearMonth::from, "YearMonth"); in test_parse_errorMessage()
130 assertGoodErrorTime(YearMonth::from, "YearMonth"); in test_parse_errorMessage()
DTestDateTimeFormatterBuilder.java72 import java.time.YearMonth;
564 assertEquals(builder.toFormatter().format(YearMonth.of(2013, 2)), "2: :2013"); in test_padOptional()
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKDateTimeFormatterBuilder.java72 import java.time.YearMonth;
469 assertEquals(builder.toFormatter().format(YearMonth.of(2013, 2)), "2: :2013"); in test_padOptional()
DTCKDateTimeFormatter.java84 import java.time.YearMonth;
278 YearMonth ym = YearMonth.of(2008, 6); in data_format_withZone_withChronology()
DTCKDateTimeFormatters.java83 import java.time.YearMonth;
1073 TemporalAccessor test = YearMonth.of(2008, 6); in test_print_basicIsoDate_missingField()
1157 TemporalAccessor test = YearMonth.of(2008, 6); in test_print_isoWeekDate_missingField()
1266 TemporalAccessor test = YearMonth.of(2008, 6); in test_print_rfc1123_missingField()
/libcore/
Dopenjdk_java_files.bp774 "ojluni/src/main/java/java/time/YearMonth.java",