Home
last modified time | relevance | path

Searched refs:toFormatter (Results 1 – 25 of 50) sorted by relevance

12

/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestDateTimeFormatterBuilder.java119 DateTimeFormatter f = builder.toFormatter(); in test_toFormatter_empty()
127 DateTimeFormatter f = builder.toFormatter(); in test_parseCaseSensitive()
134 DateTimeFormatter f = builder.toFormatter(); in test_parseCaseInsensitive()
142 DateTimeFormatter f = builder.toFormatter(); in test_parseStrict()
149 DateTimeFormatter f = builder.toFormatter(); in test_parseLenient()
157 DateTimeFormatter f = builder.toFormatter(); in test_appendValue_1arg()
170 DateTimeFormatter f = builder.toFormatter(); in test_appendValue_2arg()
193 DateTimeFormatter f = builder.toFormatter(); in test_appendValue_3arg()
236 DateTimeFormatter f = builder.toFormatter(); in test_appendValue_subsequent2_parse3()
246 DateTimeFormatter f = builder.toFormatter(); in test_appendValue_subsequent2_parse4()
[all …]
DAbstractTestPrinterParser.java117 return builder.toFormatter(locale).withDecimalStyle(decimalStyle); in getFormatter()
121 return builder.appendLiteral(c).toFormatter(locale).withDecimalStyle(decimalStyle); in getFormatter()
125 return builder.appendLiteral(s).toFormatter(locale).withDecimalStyle(decimalStyle); in getFormatter()
129 return builder.appendText(field).toFormatter(locale).withDecimalStyle(decimalStyle); in getFormatter()
133 return builder.appendText(field, style).toFormatter(locale).withDecimalStyle(decimalStyle); in getFormatter()
137 …return builder.appendValue(field, minWidth, maxWidth, signStyle).toFormatter(locale).withDecimalSt… in getFormatter()
141 …return builder.appendOffset(pattern, noOffsetText).toFormatter(locale).withDecimalStyle(decimalSty… in getFormatter()
145 return builder.appendPattern(pattern).toFormatter(locale).withDecimalStyle(decimalStyle); in getPatternFormatter()
DTestDateTimeParsing.java100 .appendPattern("yyyy-MM-dd HH:mm:ss").toFormatter();
102 .appendPattern("yyyy-MM-dd HH:mm:ss ").appendZoneId().toFormatter();
104 .appendPattern("yyyy-MM-dd HH:mm:ss ").appendOffsetId().toFormatter();
108 .appendInstant().toFormatter();
113 .appendInstant().appendLiteral(' ').appendOffsetId().toFormatter();
115 .appendInstant().appendLiteral(' ').appendValue(OFFSET_SECONDS).toFormatter();
117 .appendValue(INSTANT_SECONDS).toFormatter();
120 .appendValue(INSTANT_SECONDS).appendLiteral('.').appendValue(NANO_OF_SECOND).toFormatter();
123 .appendValue(INSTANT_SECONDS).appendLiteral(' ').appendValue(OFFSET_SECONDS).toFormatter();
227 .toFormatter(US) in test_validateHourOfAmPm()
DTestReducedPrinter.java84 …return builder.appendValueReduced(field, width, width, baseValue).toFormatter(locale).withDecimalS… in getFormatter0()
88 …return builder.appendValueReduced(field, minWidth, maxWidth, baseValue).toFormatter(locale).withDe… in getFormatter0()
92 …ValueReduced(field, minWidth, maxWidth, LocalDate.of(baseValue, 1, 1)).toFormatter(locale).withDec… in getFormatterBaseDate()
272 DateTimeFormatter dtf = builder.toFormatter(); in test_printAdjacent()
DTestReducedParser.java100 …return builder.appendValueReduced(field, width, width, baseValue).toFormatter(locale).withDecimalS… in getFormatter0()
104 …return builder.appendValueReduced(field, minWidth, maxWidth, baseValue).toFormatter(locale).withDe… in getFormatter0()
108 …ValueReduced(field, minWidth, maxWidth, LocalDate.of(baseValue, 1, 1)).toFormatter(locale).withDec… in getFormatterBaseDate()
372 DateTimeFormatter dtf = builder.toFormatter(); in test_parseAdjacent()
416 .toFormatter() in test_reducedWithChronoYear()
434 .toFormatter() in test_reducedWithChronoYearOfEra()
456 .toFormatter(); in test_reducedWithLateChronoChange()
480 .toFormatter(); in test_reducedWithLateChronoChangeTwice()
DTestDateTimeFormatter.java109 .toFormatter(Locale.ENGLISH) in test_withLocale_same()
237 DateTimeFormatter fmt = new DateTimeFormatterBuilder().appendZoneId().toFormatter() in test_throws_message_chrono()
258 DateTimeFormatter fmt = new DateTimeFormatterBuilder().appendChronologyId().toFormatter() in test_throws_message_zone()
DTestZoneTextPrinterParser.java66 .toFormatter(locale) in getFormatter()
237 .toFormatter(locale) in test_ParseText()
298 .toFormatter(locale) in getFormatter()
/libcore/ojluni/src/test/java/time/tck/java/time/format/
DTCKDateTimeFormatterBuilder.java112 DateTimeFormatter f = builder.toFormatter(); in test_toFormatter_empty()
121 .parseDefaulting(DAY_OF_MONTH, 30).toFormatter(); in test_parseDefaulting_entireDate()
134 .parseDefaulting(DAY_OF_MONTH, 1).toFormatter(); in test_parseDefaulting_yearOptionalMonthOptionalDay()
538 DateTimeFormatter f = builder.toFormatter(); in test_appendOffset_format()
546 DateTimeFormatter f = builder.toFormatter(); in test_appendOffset_parse()
617 …DateTimeFormatter df = new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter(Locale.US… in test_appendZoneText_parseGenericTimeZonePatterns()
644 …DateTimeFormatter df = new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter(Locale.US… in test_appendZoneText_parseNonGenricTimeZonePatterns_1()
687 assertEquals(builder.toFormatter().format(LocalDate.of(2013, 2, 1)), "2: 1"); in test_padNext_1arg()
699 assertEquals(builder.toFormatter().format(LocalDate.of(2013, 2, 1)), "2:-1"); in test_padNext_2arg_dash()
713 assertEquals(builder.toFormatter().format(LocalDate.of(2013, 2, 1)), "2: 1:2013"); in test_padOptional()
[all …]
DTCKPadPrinterParser.java95 builder.toFormatter().parseUnresolved("--Z", new ParsePosition(-1)); in test_parse_negativePosition()
101 builder.toFormatter().parseUnresolved("--Z", new ParsePosition(4)); in test_parse_offEndPosition()
132 TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text, pos); in test_parseStrict()
173 TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text, pos); in test_parseLenient()
188 TemporalAccessor parsed = builder.toFormatter().parseUnresolved("--HELLO-", pos); in test_parse_decoratedStartsWithPad()
197 TemporalAccessor parsed = builder.toFormatter().parseUnresolved("--2", pos); in test_parse_decoratedStartsWithPad_number()
208 TemporalAccessor parsed = builder.toFormatter().parseUnresolved("----", pos); in test_parse_decoratedEmpty_strict()
217 TemporalAccessor parsed = builder.toFormatter().parseUnresolved("----", pos); in test_parse_decoratedEmpty_lenient()
DTCKChronoPrinterParser.java98 builder.appendChronologyId().toFormatter().parseUnresolved("ISO", new ParsePosition(-1)); in test_parse_negativePosition()
103 builder.appendChronologyId().toFormatter().parseUnresolved("ISO", new ParsePosition(4)); in test_parse_offEndPosition()
123 TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text, pos); in test_parseValid_caseSensitive()
132 …TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text.toLowerCase(Locale.ENGLISH), … in test_parseValid_caseSensitive_lowercaseRejected()
141 …TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text.toLowerCase(Locale.ENGLISH), … in test_parseValid_caseInsensitive()
161 TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text, pos); in test_parseInvalid()
DTCKDateTimeParseResolver.java157 DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter(); in test_resolveOneNoChange()
196 .appendValue(field2).toFormatter(); in test_resolveTwoNoChange()
228 .appendValue(field3).toFormatter(); in test_resolveThreeNoChange()
262 DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter(); in test_resolveOneToField()
288 DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter(); in test_resolveOneToDate()
313 DateTimeFormatter f = new DateTimeFormatterBuilder().appendValue(field1).toFormatter(); in test_resolveOneToTime()
344 .appendValue(field2).toFormatter(); in test_resolveTwoToField()
392 .appendValue(field2).toFormatter(); in test_resolveTwoToDate()
479 .appendValue(field2).toFormatter(); in test_resolveTwoToTime()
512 .appendValue(field3).toFormatter(); in test_resolveThreeToDate()
[all …]
DTCKInstantPrinterParser.java119 DateTimeFormatter f = new DateTimeFormatterBuilder().appendInstant().toFormatter(); in test_print_grouped()
197 …DateTimeFormatter f = new DateTimeFormatterBuilder().appendInstant(fractionalDigits).toFormatter(); in test_print_digits()
242 DateTimeFormatter f = new DateTimeFormatterBuilder().appendInstant(-1).toFormatter(); in test_parse_digitsMinusOne()
269 DateTimeFormatter f = new DateTimeFormatterBuilder().appendInstant(9).toFormatter(); in test_parse_digitsNine()
286 DateTimeFormatter f = new DateTimeFormatterBuilder().appendInstant(-1).toFormatter(); in test_invalid_Instant()
293 DateTimeFormatter f = new DateTimeFormatterBuilder().appendInstant(-1).toFormatter(); in test_parse_endOfDay()
305 DateTimeFormatter f = new DateTimeFormatterBuilder().appendInstant(-1).toFormatter(); in test_parse_leapSecond()
DTCKDateTimeTextPrinting.java140 DateTimeFormatter f = builder.appendText(field, style).toFormatter(Locale.ENGLISH); in test_appendText2arg_format()
150 DateTimeFormatter f = builder.appendText(field).toFormatter(Locale.ENGLISH); in test_appendText1arg_format()
175 DateTimeFormatter f = builder.toFormatter(); in test_appendTextMap()
189 DateTimeFormatter f = builder.toFormatter(); in test_appendTextMap_DOM()
201 DateTimeFormatter f = builder.toFormatter(); in test_appendTextMapIncomplete()
DTCKLocalizedFieldParser.java128 DateTimeFormatter dtf = b.toFormatter(locale); in test_parse_textField()
160 DateTimeFormatter dtf = b.toFormatter(locale); in test_parse_textLocalDate()
197 DateTimeFormatter dtf = b.toFormatter(locale); in test_parse_WeekBasedYear()
226 .appendPattern(pattern).toFormatter(Locale.US); in test_adjacentValuePatterns1()
249 .appendPattern(pattern).toFormatter(Locale.US); in test_adjacentValuePatterns2()
262 .appendPattern(pattern).toFormatter(Locale.US); in test_adjacentValuePatterns3()
DTCKOffsetPrinterParser.java476 String output = builder.toFormatter().format(zdt); in test_print()
498 String output = builder.toFormatter().format(zdt); in test_print_pattern_X()
526 String output = builder.toFormatter().format(zdt); in test_print_pattern_x()
536 DateTimeFormatter f1 = new DateTimeFormatterBuilder().appendPattern("Z").toFormatter(); in test_print_pattern_Z()
540 DateTimeFormatter f2 = new DateTimeFormatterBuilder().appendPattern("ZZ").toFormatter(); in test_print_pattern_Z()
544 … DateTimeFormatter f3 = new DateTimeFormatterBuilder().appendPattern("ZZZ").toFormatter(); in test_print_pattern_Z()
549 … DateTimeFormatter f = new DateTimeFormatterBuilder().appendPattern("ZZZZZ").toFormatter(); in test_print_pattern_Z()
561 .toFormatter(Locale.US); in test_print_localized()
568 .toFormatter(Locale.US); in test_print_localized()
574 .toFormatter(Locale.US); in test_print_localized()
[all …]
DTCKZoneIdPrinterParser.java118 String output = builder.toFormatter().format(zdt); in test_print()
126 String output = builder.toFormatter().format(zdt); in test_print_pattern_VV()
247 TemporalAccessor parsed = builder.toFormatter().parseUnresolved(lcText, pos); in test_ZoneId_parseSuccess_caseSensitive()
299 TemporalAccessor parsed = builder.toFormatter().parseUnresolved(lcText, pos); in test_ZoneOrOffsetId_parseSuccess_caseSensitive()
318 TemporalAccessor parsed = builder.toFormatter().parseUnresolved(text, pos); in test()
DTCKLocalizedPrinterParser.java151 DateTimeFormatter f = builder.appendLocalized(dateStyle, null).toFormatter(locale); in test_date_print()
163 DateTimeFormatter f = builder.appendLocalized(dateStyle, null).toFormatter(locale); in test_date_parse()
204 DateTimeFormatter f = builder.appendLocalized(null, timeStyle).toFormatter(locale); in test_time_print()
224 DateTimeFormatter f = builder.appendLocalized(null, timeStyle).toFormatter(locale); in test_time_parse()
DTCKResolverStyle.java121 …ew DateTimeFormatterBuilder().appendLiteral(" ").appendText(ChronoField.ERA, eraMap).toFormatter(); in test_resolverStyle()
123 DateTimeFormatter formatter = builder.appendOptional(optionalFormatter).toFormatter(); in test_resolverStyle()
DTCKDateTimeFormatter.java131 .toFormatter(); in setUp()
177 … .appendValue(DAY_OF_MONTH).appendLiteral('-').appendValue(DAY_OF_YEAR).toFormatter(); in test_resolverFields_selectOneDateResolveYMD()
193 … .appendValue(DAY_OF_MONTH).appendLiteral('-').appendValue(DAY_OF_YEAR).toFormatter(); in test_resolverFields_selectOneDateResolveYD()
212 .appendValue(DAY_OF_WEEK).toFormatter(); in test_resolverFields_ignoreCrossCheck()
227 .appendValue(YEAR).toFormatter().withResolverFields(); in test_resolverFields_emptyList()
235 .appendValue(YEAR).toFormatter().withResolverFields(YEAR); in test_resolverFields_listOfOneMatching()
243 .appendValue(YEAR).toFormatter().withResolverFields(MONTH_OF_YEAR); in test_resolverFields_listOfOneNotMatching()
252 .appendValue(YEAR).toFormatter().withResolverFields((TemporalField) null); in test_resolverFields_listOfOneNull()
362 .toFormatter(Locale.ENGLISH) in test_format_withZone_withChronology()
394 .toFormatter(Locale.ENGLISH) in test_format_withChronology_nonChronoFieldMapLink()
[all …]
/libcore/luni/src/test/java/libcore/java/time/format/
DDateTimeFormatterBuilderTest.java48 .toFormatter(Locale.ROOT); in test_append_DateTimeFormatter()
55 new DateTimeFormatterBuilder().appendZoneRegionId().toFormatter(); in test_appendZoneRegionId_format()
66 new DateTimeFormatterBuilder().appendZoneRegionId().toFormatter(); in test_appendZoneRegionId_format_offset()
78 .toFormatter(); in test_appendZoneRegionId_parse()
99 .toFormatter(Locale.US); in test_appendGenericZoneText()
106 .toFormatter(Locale.US); in test_appendGenericZoneText()
113 .toFormatter(Locale.US); in test_appendGenericZoneText()
DDateTimeFormatterTest.java59 new DateTimeFormatterBuilder().toFormatter(), in test_getDecimalStyle()
60 new DateTimeFormatterBuilder().toFormatter(Locale.ROOT), in test_getDecimalStyle()
61 new DateTimeFormatterBuilder().toFormatter(Locale.ENGLISH), in test_getDecimalStyle()
62 new DateTimeFormatterBuilder().toFormatter(arLocale), in test_getDecimalStyle()
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeFormatter.java567 return new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter(); in ofPattern()
591 return new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter(locale); in ofPattern()
620 .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE); in ofLocalizedDate()
651 .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE); in ofLocalizedTime()
682 .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE); in ofLocalizedDateTime()
715 .toFormatter(ResolverStyle.SMART, IsoChronology.INSTANCE); in ofLocalizedDateTime()
750 .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
778 .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
811 .toFormatter(ResolverStyle.STRICT, IsoChronology.INSTANCE);
852 .toFormatter(ResolverStyle.STRICT, null);
[all …]
/libcore/ojluni/src/test/java/time/tck/java/time/temporal/
DTCKIsoFields.java160 .toFormatter().withResolverStyle(ResolverStyle.STRICT); in test_parse_quarters()
171 .toFormatter().withResolverStyle(ResolverStyle.SMART); in test_parse_quarters_SMART()
182 .toFormatter().withResolverStyle(ResolverStyle.LENIENT); in test_parse_quarters_LENIENT()
217 .toFormatter().withResolverStyle(ResolverStyle.STRICT); in test_parse_parseLenientQuarter_STRICT()
227 .toFormatter().withResolverStyle(ResolverStyle.SMART); in test_parse_parseLenientQuarter_SMART()
247 .toFormatter().withResolverStyle(ResolverStyle.LENIENT); in test_parse_parseLenientQuarter_LENIENT()
359 .toFormatter().withResolverStyle(ResolverStyle.STRICT); in test_parse_weeks_STRICT()
370 .toFormatter().withResolverStyle(ResolverStyle.SMART); in test_parse_weeks_SMART()
381 .toFormatter().withResolverStyle(ResolverStyle.LENIENT); in test_parse_weeks_LENIENT()
409 .toFormatter().withResolverStyle(ResolverStyle.STRICT); in test_parse_parseLenientWeek_STRICT()
[all …]
DTCKWeekFields.java391 .appendValue(DAY_OF_WEEK).toFormatter().withResolverStyle(SMART); in test_parse_resolve_localizedWom()
412 .appendValue(DAY_OF_WEEK).toFormatter().withResolverStyle(LENIENT); in test_parse_resolve_localizedWom_lenient()
433 .appendValue(DAY_OF_WEEK).toFormatter().withResolverStyle(STRICT); in test_parse_resolve_localizedWom_strict()
459 .appendValue(dowField).toFormatter(); in test_parse_resolve_localizedWomDow()
481 .appendValue(dowField).toFormatter().withResolverStyle(LENIENT); in test_parse_resolve_localizedWomDow_lenient()
505 .appendValue(DAY_OF_WEEK).toFormatter(); in test_parse_resolve_localizedWoy()
525 .appendValue(DAY_OF_WEEK).toFormatter().withResolverStyle(LENIENT); in test_parse_resolve_localizedWoy_lenient()
545 .appendValue(DAY_OF_WEEK).toFormatter().withResolverStyle(STRICT); in test_parse_resolve_localizedWoy_strict()
570 .appendValue(dowField).toFormatter(); in test_parse_resolve_localizedWoyDow()
591 .appendValue(dowField).toFormatter().withResolverStyle(LENIENT); in test_parse_resolve_localizedWoyDow_lenient()
[all …]
DTCKJulianFields.java145 .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()

12