Home
last modified time | relevance | path

Searched refs:ResolverStyle (Results 1 – 25 of 30) sorted by relevance

12

/libcore/ojluni/src/test/java/time/tck/java/time/chrono/
DTCKJapaneseChronology.java92 import java.time.format.ResolverStyle;
727 … Object[][] result = new Object[ResolverStyle.values().length * JapaneseEra.values().length][]; in data_resolve_styleByEra()
729 for (ResolverStyle style : ResolverStyle.values()) { in data_resolve_styleByEra()
738 public void test_resolve_yearOfEra_eraOnly_valid(ResolverStyle style, JapaneseEra era) { in test_resolve_yearOfEra_eraOnly_valid()
748 …public void test_resolve_yearOfEra_eraAndYearOfEraOnly_valid(ResolverStyle style, JapaneseEra era)… in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid()
760 public void test_resolve_yearOfEra_eraAndYearOnly_valid(ResolverStyle style, JapaneseEra era) { in test_resolve_yearOfEra_eraAndYearOnly_valid()
773 Object[][] result = new Object[ResolverStyle.values().length][]; in data_resolve_styles()
775 for (ResolverStyle style : ResolverStyle.values()) { in data_resolve_styles()
782 public void test_resolve_yearOfEra_yearOfEraOnly_valid(ResolverStyle style) { in test_resolve_yearOfEra_yearOfEraOnly_valid()
792 public void test_resolve_yearOfEra_yearOfEraAndYearOnly_valid(ResolverStyle style) { in test_resolve_yearOfEra_yearOfEraAndYearOnly_valid()
[all …]
DTCKIsoChronology.java70 import java.time.format.ResolverStyle;
284 {ResolverStyle.STRICT, -1, null, null, null, null}, in data_resolve_yearOfEra()
285 {ResolverStyle.SMART, -1, null, null, null, null}, in data_resolve_yearOfEra()
286 {ResolverStyle.LENIENT, -1, null, null, null, null}, in data_resolve_yearOfEra()
288 {ResolverStyle.STRICT, 0, null, null, ChronoField.ERA, 0}, in data_resolve_yearOfEra()
289 {ResolverStyle.SMART, 0, null, null, ChronoField.ERA, 0}, in data_resolve_yearOfEra()
290 {ResolverStyle.LENIENT, 0, null, null, ChronoField.ERA, 0}, in data_resolve_yearOfEra()
292 {ResolverStyle.STRICT, 1, null, null, ChronoField.ERA, 1}, in data_resolve_yearOfEra()
293 {ResolverStyle.SMART, 1, null, null, ChronoField.ERA, 1}, in data_resolve_yearOfEra()
294 {ResolverStyle.LENIENT, 1, null, null, ChronoField.ERA, 1}, in data_resolve_yearOfEra()
[all …]
DTCKThaiBuddhistChronology.java88 import java.time.format.ResolverStyle;
535 {ResolverStyle.STRICT, -1, null, null, null, null}, in data_resolve_yearOfEra()
536 {ResolverStyle.SMART, -1, null, null, null, null}, in data_resolve_yearOfEra()
537 {ResolverStyle.LENIENT, -1, null, null, null, null}, in data_resolve_yearOfEra()
539 {ResolverStyle.STRICT, 0, null, null, ChronoField.ERA, 0}, in data_resolve_yearOfEra()
540 {ResolverStyle.SMART, 0, null, null, ChronoField.ERA, 0}, in data_resolve_yearOfEra()
541 {ResolverStyle.LENIENT, 0, null, null, ChronoField.ERA, 0}, in data_resolve_yearOfEra()
543 {ResolverStyle.STRICT, 1, null, null, ChronoField.ERA, 1}, in data_resolve_yearOfEra()
544 {ResolverStyle.SMART, 1, null, null, ChronoField.ERA, 1}, in data_resolve_yearOfEra()
545 {ResolverStyle.LENIENT, 1, null, null, ChronoField.ERA, 1}, in data_resolve_yearOfEra()
[all …]
DTCKMinguoChronology.java89 import java.time.format.ResolverStyle;
559 {ResolverStyle.STRICT, -1, null, null, null, null}, in data_resolve_yearOfEra()
560 {ResolverStyle.SMART, -1, null, null, null, null}, in data_resolve_yearOfEra()
561 {ResolverStyle.LENIENT, -1, null, null, null, null}, in data_resolve_yearOfEra()
563 {ResolverStyle.STRICT, 0, null, null, ChronoField.ERA, 0}, in data_resolve_yearOfEra()
564 {ResolverStyle.SMART, 0, null, null, ChronoField.ERA, 0}, in data_resolve_yearOfEra()
565 {ResolverStyle.LENIENT, 0, null, null, ChronoField.ERA, 0}, in data_resolve_yearOfEra()
567 {ResolverStyle.STRICT, 1, null, null, ChronoField.ERA, 1}, in data_resolve_yearOfEra()
568 {ResolverStyle.SMART, 1, null, null, ChronoField.ERA, 1}, in data_resolve_yearOfEra()
569 {ResolverStyle.LENIENT, 1, null, null, ChronoField.ERA, 1}, in data_resolve_yearOfEra()
[all …]
DTCKHijrahChronology.java75 import java.time.format.ResolverStyle;
205 Object[][] result = new Object[ResolverStyle.values().length * HijrahEra.values().length][]; in data_resolve_styleByEra()
207 for (ResolverStyle style : ResolverStyle.values()) { in data_resolve_styleByEra()
216 public void test_resolve_yearOfEra_eraOnly_valid(ResolverStyle style, HijrahEra era) { in test_resolve_yearOfEra_eraOnly_valid()
226 … public void test_resolve_yearOfEra_eraAndYearOfEraOnly_valid(ResolverStyle style, HijrahEra era) { in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid()
239 public void test_resolve_yearOfEra_eraAndYearOnly_valid(ResolverStyle style, HijrahEra era) { in test_resolve_yearOfEra_eraAndYearOnly_valid()
252 Object[][] result = new Object[ResolverStyle.values().length][]; in data_resolve_styles()
254 for (ResolverStyle style : ResolverStyle.values()) { in data_resolve_styles()
261 public void test_resolve_yearOfEra_yearOfEraOnly_valid(ResolverStyle style) { in test_resolve_yearOfEra_yearOfEraOnly_valid()
266 …assertEquals(fieldValues.get(ChronoField.YEAR_OF_ERA), (style != ResolverStyle.STRICT) ? null : (L… in test_resolve_yearOfEra_yearOfEraOnly_valid()
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKResolverStyle.java65 import java.time.format.ResolverStyle;
87 for (ResolverStyle style : ResolverStyle.values()) { in test_valueOf()
88 assertEquals(ResolverStyle.valueOf(style.name()), style); in test_valueOf()
95 {"2000/15/30", ResolverStyle.LENIENT, null, 2001, 3, 30}, in data_resolverStyle()
96 {"2000/02/30", ResolverStyle.SMART, null, 2000, 2, 29}, in data_resolverStyle()
97 {"2000/02/29", ResolverStyle.STRICT, null, 2000, 2, 29}, in data_resolverStyle()
99 {"2000/15/30 CE", ResolverStyle.LENIENT, null, 2001, 3, 30}, in data_resolverStyle()
100 {"2000/02/30 CE", ResolverStyle.SMART, null, 2000, 2, 29}, in data_resolverStyle()
101 {"5/02/29 BCE", ResolverStyle.STRICT, null, 5, 2, 29}, in data_resolverStyle()
103 {"4/02/29 BCE", ResolverStyle.STRICT, DateTimeException.class, -1, -1, -1}, in data_resolverStyle()
[all …]
DTCKDateTimeParseResolver.java62 import static java.time.format.ResolverStyle.LENIENT;
63 import static java.time.format.ResolverStyle.SMART;
64 import static java.time.format.ResolverStyle.STRICT;
115 import java.time.format.ResolverStyle;
562 {ResolverStyle.STRICT, 14, 59, 60, 123456789, null, null}, in data_resolveFourToTime()
563 {ResolverStyle.SMART, 14, 59, 60, 123456789, null, null}, in data_resolveFourToTime()
564 … {ResolverStyle.LENIENT, 14, 59, 60, 123456789, LocalTime.of(15, 0, 0, 123456789), Period.ZERO}, in data_resolveFourToTime()
566 {ResolverStyle.STRICT, 23, 59, 60, 123456789, null, null}, in data_resolveFourToTime()
567 {ResolverStyle.SMART, 23, 59, 60, 123456789, null, null}, in data_resolveFourToTime()
568 …{ResolverStyle.LENIENT, 23, 59, 60, 123456789, LocalTime.of(0, 0, 0, 123456789), Period.ofDays(1)}, in data_resolveFourToTime()
[all …]
DTCKInstantPrinterParser.java72 import java.time.format.ResolverStyle;
255 for (ResolverStyle style : ResolverStyle.values()) { in test_parse_endOfDay()
267 for (ResolverStyle style : ResolverStyle.values()) { in test_parse_leapSecond()
DTCKDateTimeFormatters.java92 import java.time.format.ResolverStyle;
178 …quals(DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL).getResolverStyle(), ResolverStyle.SMART); in test_ofLocalizedDate_basics()
185 …quals(DateTimeFormatter.ofLocalizedTime(FormatStyle.FULL).getResolverStyle(), ResolverStyle.SMART); in test_ofLocalizedTime_basics()
192 …s(DateTimeFormatter.ofLocalizedDateTime(FormatStyle.FULL).getResolverStyle(), ResolverStyle.SMART); in test_ofLocalizedDateTime1_basics()
199 …ofLocalizedDateTime(FormatStyle.FULL, FormatStyle.MEDIUM).getResolverStyle(), ResolverStyle.SMART); in test_ofLocalizedDateTime2_basics()
293 assertEquals(DateTimeFormatter.ISO_LOCAL_DATE.getResolverStyle(), ResolverStyle.STRICT); in test_isoLocalDate_basics()
351 assertEquals(DateTimeFormatter.ISO_OFFSET_DATE.getResolverStyle(), ResolverStyle.STRICT); in test_isoOffsetDate_basics()
411 assertEquals(DateTimeFormatter.ISO_DATE.getResolverStyle(), ResolverStyle.STRICT); in test_isoDate_basics()
481 assertEquals(DateTimeFormatter.ISO_LOCAL_TIME.getResolverStyle(), ResolverStyle.STRICT); in test_isoLocalTime_basics()
551 assertEquals(DateTimeFormatter.ISO_OFFSET_TIME.getResolverStyle(), ResolverStyle.STRICT); in test_isoOffsetTime_basics()
[all …]
/libcore/ojluni/src/main/java/java/time/chrono/
DAbstractChronology.java91 import java.time.format.ResolverStyle;
453 …public ChronoLocalDate resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverSty… in resolveDate()
498 void resolveProlepticMonth(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) { in resolveProlepticMonth()
501 if (resolverStyle != ResolverStyle.LENIENT) { in resolveProlepticMonth()
513 …ChronoLocalDate resolveYearOfEra(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle… in resolveYearOfEra()
518 if (resolverStyle != ResolverStyle.LENIENT) { in resolveYearOfEra()
531 } else if (resolverStyle == ResolverStyle.STRICT) { in resolveYearOfEra()
551 ChronoLocalDate resolveYMD(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) { in resolveYMD()
553 if (resolverStyle == ResolverStyle.LENIENT) { in resolveYMD()
561 if (resolverStyle == ResolverStyle.SMART) { // previous valid in resolveYMD()
[all …]
DIsoChronology.java84 import java.time.format.ResolverStyle;
491 … public LocalDate resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) { in resolveDate()
496 void resolveProlepticMonth(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) { in resolveProlepticMonth()
499 if (resolverStyle != ResolverStyle.LENIENT) { in resolveProlepticMonth()
508 LocalDate resolveYearOfEra(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) { in resolveYearOfEra()
511 if (resolverStyle != ResolverStyle.LENIENT) { in resolveYearOfEra()
517 if (resolverStyle == ResolverStyle.STRICT) { in resolveYearOfEra()
543 LocalDate resolveYMD(Map <TemporalField, Long> fieldValues, ResolverStyle resolverStyle) { in resolveYMD()
545 if (resolverStyle == ResolverStyle.LENIENT) { in resolveYMD()
552 if (resolverStyle == ResolverStyle.SMART) { // previous valid in resolveYMD()
DJapaneseChronology.java77 import java.time.format.ResolverStyle;
433 …public JapaneseDate resolveDate(Map <TemporalField, Long> fieldValues, ResolverStyle resolverStyle… in resolveDate()
438 …ChronoLocalDate resolveYearOfEra(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle… in resolveYearOfEra()
451 …eLong != null && fieldValues.containsKey(YEAR) == false && resolverStyle != ResolverStyle.STRICT) { in resolveYearOfEra()
472 …lveYMD(JapaneseEra era, int yoe, Map<TemporalField,Long> fieldValues, ResolverStyle resolverStyle)… in resolveYMD()
475 if (resolverStyle == ResolverStyle.LENIENT) { in resolveYMD()
483 if (resolverStyle == ResolverStyle.SMART) { // previous valid in resolveYMD()
505 …lveYD(JapaneseEra era, int yoe, Map <TemporalField,Long> fieldValues, ResolverStyle resolverStyle)… in resolveYD()
508 if (resolverStyle == ResolverStyle.LENIENT) { in resolveYD()
DChronology.java71 import java.time.format.ResolverStyle;
674 ChronoLocalDate resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle); in resolveDate()
DMinguoChronology.java70 import java.time.format.ResolverStyle;
334 … public MinguoDate resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverStyle) { in resolveDate()
DThaiBuddhistChronology.java70 import java.time.format.ResolverStyle;
370 …public ThaiBuddhistDate resolveDate(Map<TemporalField, Long> fieldValues, ResolverStyle resolverSt… in resolveDate()
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeFormatter.java500 private final ResolverStyle resolverStyle;
589 .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE); in ofLocalizedDate()
617 .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE); in ofLocalizedTime()
645 .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE); in ofLocalizedDateTime()
675 .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE); in ofLocalizedDateTime()
710 .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
738 .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
771 .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
812 .toFormatter(ResolverStyle.STRICT, null);
839 .toFormatter(ResolverStyle.STRICT, null);
[all …]
DParsed.java145 private ResolverStyle resolverStyle;
239 TemporalAccessor resolve(ResolverStyle resolverStyle, Set<TemporalField> resolverFields) { in resolve()
373 … if (resolverStyle == ResolverStyle.STRICT || (resolverStyle == ResolverStyle.SMART && ch != 0)) { in resolveTimeFields()
381 … if (resolverStyle == ResolverStyle.STRICT || (resolverStyle == ResolverStyle.SMART && ch != 0)) { in resolveTimeFields()
389 if (resolverStyle == ResolverStyle.LENIENT) { in resolveTimeFields()
399 if (resolverStyle != ResolverStyle.LENIENT) { in resolveTimeFields()
409 if (resolverStyle != ResolverStyle.LENIENT) { in resolveTimeFields()
417 if (resolverStyle != ResolverStyle.LENIENT) { in resolveTimeFields()
425 if (resolverStyle != ResolverStyle.LENIENT) { in resolveTimeFields()
434 if (resolverStyle != ResolverStyle.LENIENT) { in resolveTimeFields()
[all …]
DResolverStyle.java77 public enum ResolverStyle { enum
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKIsoFields.java77 import java.time.format.ResolverStyle;
157 .toFormatter().withResolverStyle(ResolverStyle.STRICT); in test_parse_quarters()
168 .toFormatter().withResolverStyle(ResolverStyle.SMART); in test_parse_quarters_SMART()
179 .toFormatter().withResolverStyle(ResolverStyle.LENIENT); in test_parse_quarters_LENIENT()
214 .toFormatter().withResolverStyle(ResolverStyle.STRICT); in test_parse_parseLenientQuarter_STRICT()
224 .toFormatter().withResolverStyle(ResolverStyle.SMART); in test_parse_parseLenientQuarter_SMART()
244 .toFormatter().withResolverStyle(ResolverStyle.LENIENT); in test_parse_parseLenientQuarter_LENIENT()
356 .toFormatter().withResolverStyle(ResolverStyle.STRICT); in test_parse_weeks_STRICT()
367 .toFormatter().withResolverStyle(ResolverStyle.SMART); in test_parse_weeks_SMART()
378 .toFormatter().withResolverStyle(ResolverStyle.LENIENT); in test_parse_weeks_LENIENT()
[all …]
DTCKJulianFields.java68 import java.time.format.ResolverStyle;
145 .toFormatter().withResolverStyle(ResolverStyle.STRICT); in test_samples_parse_STRICT()
153 .toFormatter().withResolverStyle(ResolverStyle.SMART); in test_samples_parse_SMART()
161 .toFormatter().withResolverStyle(ResolverStyle.LENIENT); in test_samples_parse_LENIENT()
/libcore/ojluni/src/main/java/java/time/temporal/
DTemporalField.java66 import java.time.format.ResolverStyle;
377 ResolverStyle resolverStyle) { in resolve()
DJulianFields.java71 import java.time.format.ResolverStyle;
292 …p<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle)… in resolve()
295 if (resolverStyle == ResolverStyle.LENIENT) { in resolve()
DWeekFields.java87 import java.time.format.ResolverStyle;
916 …p<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle)… in resolve()
958 …ues, Chronology chrono, int year, long month, long wom, int localDow, ResolverStyle resolverStyle)… in resolveWoM()
960 if (resolverStyle == ResolverStyle.LENIENT) { in resolveWoM()
972 if (resolverStyle == ResolverStyle.STRICT && date.getLong(MONTH_OF_YEAR) != month) { in resolveWoM()
984 …ng> fieldValues, Chronology chrono, int year, long woy, int localDow, ResolverStyle resolverStyle)… in resolveWoY()
986 if (resolverStyle == ResolverStyle.LENIENT) { in resolveWoY()
995 if (resolverStyle == ResolverStyle.STRICT && date.getLong(YEAR) != year) { in resolveWoY()
1006 …ap<TemporalField, Long> fieldValues, Chronology chrono, int localDow, ResolverStyle resolverStyle)… in resolveWBY()
1010 if (resolverStyle == ResolverStyle.LENIENT) { in resolveWBY()
[all …]
DIsoFields.java81 import java.time.format.ResolverStyle;
344 …p<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle)… in resolve()
354 if (resolverStyle == ResolverStyle.LENIENT) { in resolve()
361 if (resolverStyle == ResolverStyle.STRICT) { in resolve()
468 …p<TemporalField, Long> fieldValues, TemporalAccessor partialTemporal, ResolverStyle resolverStyle)… in resolve()
478 if (resolverStyle == ResolverStyle.LENIENT) { in resolve()
491 if (resolverStyle == ResolverStyle.STRICT) { in resolve()
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestNonIsoFormatter.java47 import java.time.format.ResolverStyle;
203 DateTimeFormatter dtfLenient = dtf.withResolverStyle(ResolverStyle.LENIENT); in test_lenientEraYear()

12