/libcore/ojluni/src/main/java/sun/util/locale/provider/ |
D | CalendarDataUtility.java | 103 public static String retrieveFieldValueName(String id, int field, int value, int style, in retrieveFieldValueName() argument 127 String[] names = getNames(id, field, style, locale); in retrieveFieldValueName() 150 public static String retrieveJavaTimeFieldValueName(String id, int field, int value, int style, in retrieveJavaTimeFieldValueName() argument 153 return retrieveFieldValueName(id, field, value, style, locale); in retrieveJavaTimeFieldValueName() 166 public static Map<String, Integer> retrieveFieldValueNames(String id, int field, int style, in retrieveFieldValueNames() argument 169 if (style == ALL_STYLES) { in retrieveFieldValueNames() 176 names = retrieveFieldValueNamesImpl(id, field, style, locale); in retrieveFieldValueNames() 198 int style, Locale locale) { in retrieveJavaTimeFieldValueNames() argument 200 return retrieveFieldValueNames(id, field, style, locale); in retrieveJavaTimeFieldValueNames() 225 private static Map<String, Integer> retrieveFieldValueNamesImpl(String id, int field, int style, in retrieveFieldValueNamesImpl() argument [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/format/ |
D | TestZoneTextPrinterParser.java | 63 protected static DateTimeFormatter getFormatter(Locale locale, TextStyle style) { in getFormatter() argument 64 return new DateTimeFormatterBuilder().appendZoneText(style) in getFormatter() 113 …private void printText(Locale locale, ZonedDateTime zdt, TextStyle style, TimeZone zone, String ex… in printText() argument 114 String result = getFormatter(locale, style).format(zdt); in printText() 125 System.out.printf("[%-5s, %5s] :[%s]%n", locale.toString(), style.toString(),result); in printText() 191 …st_ParseText(String expected, String text, Set<ZoneId> preferred, Locale locale, TextStyle style) { in test_ParseText() argument 192 DateTimeFormatter fmt = new DateTimeFormatterBuilder().appendZoneText(style, preferred) in test_ParseText() 200 style == TextStyle.FULL ? " full" :"short", in test_ParseText() 208 private void parseText(Set<String> zids, Locale locale, TextStyle style, boolean ci) { in parseText() argument 210 DateTimeFormatter fmt = getFormatter(locale, style, ci); in parseText() [all …]
|
D | TestTextParser.java | 98 …public void test_parse_error(TemporalField field, TextStyle style, String text, int pos, Class<?> … in test_parse_error() argument 100 getFormatter(field, style).parseUnresolved(text, new ParsePosition(pos)); in test_parse_error() 249 …public void test_parseText(TemporalField field, TextStyle style, int value, String input) throws E… in test_parseText() argument 251 … assertEquals(getFormatter(field, style).parseUnresolved(input, pos).getLong(field), (long) value); in test_parseText() 256 …public void test_parseNumber(TemporalField field, TextStyle style, int value, String input) throws… in test_parseNumber() argument 258 … assertEquals(getFormatter(field, style).parseUnresolved(input, pos).getLong(field), (long) value); in test_parseNumber() 263 …public void test_parseStandaloneText(Locale locale, TemporalField field, TextStyle style, int expe… in test_parseStandaloneText() argument 264 DateTimeFormatter formatter = getFormatter(field, style).withLocale(locale); in test_parseStandaloneText() 280 …public void test_parse_strict_caseSensitive_parseUpper(TemporalField field, TextStyle style, int v… in test_parse_strict_caseSensitive_parseUpper() argument 287 getFormatter(field, style).parseUnresolved(input.toUpperCase(Locale.ROOT), pos); in test_parse_strict_caseSensitive_parseUpper() [all …]
|
D | TestTextPrinter.java | 247 …public void test_format(TemporalField field, TextStyle style, int value, String expected) throws E… in test_format() argument 248 getFormatter(field, style).formatTo(new MockFieldValue(field, value), buf); in test_format() 260 …public void test_formatJapaneseEra(TemporalField field, TextStyle style, int value, String expecte… in test_formatJapaneseEra() argument 262 getFormatter(field, style).withChronology(JapaneseChronology.INSTANCE).formatTo(ld, buf); in test_formatJapaneseEra() 267 …public void test_standaloneNames(Locale locale, TemporalField field, TextStyle style, String expec… in test_standaloneNames() argument 268 getFormatter(field, style).withLocale(locale).formatTo(LocalDate.of(2013, 1, 1), buf); in test_standaloneNames()
|
D | TestNumberParser.java | 96 …public void test_parse_error(TemporalField field, int min, int max, SignStyle style, String text, … in test_parse_error() argument 98 getFormatter(field, min, max, style).parseUnresolved(text, new ParsePosition(pos)); in test_parse_error() 308 …public void test_parseSignsStrict(String input, int min, int max, SignStyle style, int parseLen, I… in test_parseSignsStrict() argument 310 … TemporalAccessor parsed = getFormatter(DAY_OF_MONTH, min, max, style).parseUnresolved(input, pos); in test_parseSignsStrict() 417 …public void test_parseSignsLenient(String input, int min, int max, SignStyle style, int parseLen, … in test_parseSignsLenient() argument 420 … TemporalAccessor parsed = getFormatter(DAY_OF_MONTH, min, max, style).parseUnresolved(input, pos); in test_parseSignsLenient() 508 …public void test_parseDigitsLenient(String input, int min, int max, SignStyle style, int parseLen,… in test_parseDigitsLenient() argument 511 … TemporalAccessor parsed = getFormatter(DAY_OF_MONTH, min, max, style).parseUnresolved(input, pos); in test_parseDigitsLenient()
|
/libcore/ojluni/src/test/java/time/tck/java/time/format/ |
D | TCKFormatStyle.java | 88 for (FormatStyle style : FormatStyle.values()) { in test_valueOf() 89 assertEquals(FormatStyle.valueOf(style.name()), style); in test_valueOf() local 110 public void test_formatStyle(Temporal temporal, FormatStyle style, String formattedStr) { in test_formatStyle() argument 112 …DateTimeFormatter formatter = builder.appendLocalized(style, style).appendLiteral(" ").appendZoneO… in test_formatStyle()
|
D | TCKResolverStyle.java | 87 for (ResolverStyle style : ResolverStyle.values()) { in test_valueOf() 88 assertEquals(ResolverStyle.valueOf(style.name()), style); in test_valueOf() local 110 …public void test_resolverStyle(String str, ResolverStyle style, Class<?> expectedEx, int year, int… in test_resolverStyle() argument 124 formatter = formatter.withResolverStyle(style); in test_resolverStyle()
|
D | TCKSignStyle.java | 85 for (SignStyle style : SignStyle.values()) { in test_valueOf() 86 assertEquals(SignStyle.valueOf(style.name()), style); in test_valueOf() local 119 …public void test_signStyle(LocalDate localDate, SignStyle style, Class<?> expectedEx, String expec… in test_signStyle() argument 121 DateTimeFormatter formatter = builder.appendValue(ChronoField.YEAR, 2, 4, style) in test_signStyle()
|
D | TCKTextStyle.java | 99 for (TextStyle style : TextStyle.values()) { in test_valueOf() 100 assertEquals(TextStyle.valueOf(style.name()), style); in test_valueOf() local
|
D | TCKInstantPrinterParser.java | 255 for (ResolverStyle style : ResolverStyle.values()) { in test_parse_endOfDay() 256 TemporalAccessor parsed = f.withResolverStyle(style).parse("1970-02-03T24:00:00Z"); in test_parse_endOfDay() 267 for (ResolverStyle style : ResolverStyle.values()) { in test_parse_leapSecond() 268 … TemporalAccessor parsed = f.withResolverStyle(style).parse("1970-02-03T23:59:60.123456789Z"); in test_parse_leapSecond()
|
D | TCKDateTimeParseResolver.java | 601 public void test_resolveFourToTime(ResolverStyle style, in test_resolveFourToTime() argument 609 … ResolverStyle[] styles = (style != null ? new ResolverStyle[] {style} : ResolverStyle.values()); in test_resolveFourToTime() 618 f.withResolverStyle(style).parse(""); in test_resolveFourToTime() 628 public void test_resolveThreeToTime(ResolverStyle style, in test_resolveThreeToTime() argument 635 … ResolverStyle[] styles = (style != null ? new ResolverStyle[] {style} : ResolverStyle.values()); in test_resolveThreeToTime() 644 f.withResolverStyle(style).parse(""); in test_resolveThreeToTime() 654 public void test_resolveFourToDateTime(ResolverStyle style, in test_resolveFourToDateTime() argument 663 … ResolverStyle[] styles = (style != null ? new ResolverStyle[] {style} : ResolverStyle.values()); in test_resolveFourToDateTime() 700 …public void test_resolveSecondOfDay(ResolverStyle style, long value, Integer expectedSecond, int e… in test_resolveSecondOfDay() argument 705 TemporalAccessor accessor = f.withResolverStyle(style).parse(str); in test_resolveSecondOfDay() [all …]
|
D | TCKDateTimeTextPrinting.java | 139 …public void test_appendText2arg_format(TemporalField field, TextStyle style, int value, String exp… in test_appendText2arg_format() argument 140 DateTimeFormatter f = builder.appendText(field, style).toFormatter(Locale.ENGLISH); in test_appendText2arg_format() 148 …public void test_appendText1arg_format(TemporalField field, TextStyle style, int value, String exp… in test_appendText1arg_format() argument 149 if (style == TextStyle.FULL) { in test_appendText1arg_format()
|
/libcore/ojluni/src/main/java/java/util/ |
D | Calendar.java | 2063 public String getDisplayName(int field, int style, Locale locale) { in getDisplayName() argument 2067 if (style == ALL_STYLES) { in getDisplayName() 2068 style = SHORT; in getDisplayName() 2071 if (!checkDisplayNameParams(field, style, SHORT, NARROW_FORMAT, locale, in getDisplayName() 2079 if (isStandaloneStyle(style) || isNarrowFormatStyle(style)) { in getDisplayName() 2082 style, locale); in getDisplayName() 2085 if (isNarrowFormatStyle(style)) { in getDisplayName() 2088 toStandaloneStyle(style), in getDisplayName() 2090 } else if (isStandaloneStyle(style)) { in getDisplayName() 2093 getBaseStyle(style), in getDisplayName() [all …]
|
D | TimeZone.java | 373 public final String getDisplayName(boolean daylight, int style) { in getDisplayName() argument 374 return getDisplayName(daylight, style, in getDisplayName() 388 public String getDisplayName(boolean daylightTime, int style, Locale locale) { in getDisplayName() argument 391 switch (style) { in getDisplayName() 403 throw new IllegalArgumentException("Illegal style: " + style); in getDisplayName()
|
/libcore/ojluni/src/main/java/java/time/format/ |
D | DateTimeTextProvider.java | 141 public String getText(TemporalField field, long value, TextStyle style, Locale locale) { in getText() argument 144 return ((LocaleStore) store).getText(value, style); in getText() 165 TextStyle style, Locale locale) { in getText() argument 168 return getText(field, value, style, locale); in getText() 200 chrono.getCalendarType(), fieldIndex, fieldValue, style.toCalendarStyle(), locale); in getText() 219 …public Iterator<Entry<String, Long>> getTextIterator(TemporalField field, TextStyle style, Locale … in getTextIterator() argument 222 return ((LocaleStore) store).getTextIterator(style); in getTextIterator() 245 TextStyle style, Locale locale) { in getTextIterator() argument 248 return getTextIterator(field, style, locale); in getTextIterator() 269 int calendarStyle = (style == null) ? Calendar.ALL_STYLES : style.toCalendarStyle(); in getTextIterator() [all …]
|
/libcore/ojluni/src/main/java/java/text/ |
D | DateFormat.java | 471 public final static DateFormat getTimeInstance(int style) in getTimeInstance() argument 473 return get(style, 0, 1, Locale.getDefault(Locale.Category.FORMAT)); in getTimeInstance() 484 public final static DateFormat getTimeInstance(int style, in getTimeInstance() argument 487 return get(style, 0, 1, aLocale); in getTimeInstance() 517 public final static DateFormat getDateInstance(int style) in getDateInstance() argument 519 return get(0, style, 2, Locale.getDefault(Locale.Category.FORMAT)); in getDateInstance() 530 public final static DateFormat getDateInstance(int style, in getDateInstance() argument 533 return get(0, style, 2, aLocale); in getDateInstance()
|
/libcore/ojluni/annotations/hiddenapi/java/util/ |
D | Calendar.java | 149 public java.lang.String getDisplayName(int field, int style, java.util.Locale locale) { in getDisplayName() argument 154 int field, int style, java.util.Locale locale) { in getDisplayNames() argument 159 int field, int style, java.util.Locale locale) { in getDisplayNamesImpl() argument 165 int style, in checkDisplayNameParams() argument 174 int field, int style, java.text.DateFormatSymbols symbols) { in getFieldStrings() argument 218 int getBaseStyle(int style) { in getBaseStyle() argument 222 private int toStandaloneStyle(int style) { in toStandaloneStyle() argument 226 private boolean isStandaloneStyle(int style) { in isStandaloneStyle() argument 230 private boolean isNarrowStyle(int style) { in isNarrowStyle() argument 234 private boolean isNarrowFormatStyle(int style) { in isNarrowFormatStyle() argument
|
/libcore/ojluni/src/test/java/time/tck/java/time/chrono/ |
D | TCKHijrahChronology.java | 207 for (ResolverStyle style : ResolverStyle.values()) { in data_resolve_styleByEra() 209 result[i++] = new Object[] {style, era}; in data_resolve_styleByEra() 216 public void test_resolve_yearOfEra_eraOnly_valid(ResolverStyle style, HijrahEra era) { in test_resolve_yearOfEra_eraOnly_valid() argument 219 HijrahDate date = HijrahChronology.INSTANCE.resolveDate(fieldValues, style); in test_resolve_yearOfEra_eraOnly_valid() 226 … public void test_resolve_yearOfEra_eraAndYearOfEraOnly_valid(ResolverStyle style, HijrahEra era) { in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid() argument 230 HijrahDate date = HijrahChronology.INSTANCE.resolveDate(fieldValues, style); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid() 239 public void test_resolve_yearOfEra_eraAndYearOnly_valid(ResolverStyle style, HijrahEra era) { in test_resolve_yearOfEra_eraAndYearOnly_valid() argument 243 HijrahDate date = HijrahChronology.INSTANCE.resolveDate(fieldValues, style); in test_resolve_yearOfEra_eraAndYearOnly_valid() 254 for (ResolverStyle style : ResolverStyle.values()) { in data_resolve_styles() 255 result[i++] = new Object[] {style}; in data_resolve_styles() [all …]
|
D | TCKJapaneseChronology.java | 729 for (ResolverStyle style : ResolverStyle.values()) { in data_resolve_styleByEra() 731 result[i++] = new Object[] {style, era}; in data_resolve_styleByEra() 738 public void test_resolve_yearOfEra_eraOnly_valid(ResolverStyle style, JapaneseEra era) { in test_resolve_yearOfEra_eraOnly_valid() argument 741 JapaneseDate date = JapaneseChronology.INSTANCE.resolveDate(fieldValues, style); in test_resolve_yearOfEra_eraOnly_valid() 748 …public void test_resolve_yearOfEra_eraAndYearOfEraOnly_valid(ResolverStyle style, JapaneseEra era)… in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid() argument 752 JapaneseDate date = JapaneseChronology.INSTANCE.resolveDate(fieldValues, style); in test_resolve_yearOfEra_eraAndYearOfEraOnly_valid() 760 public void test_resolve_yearOfEra_eraAndYearOnly_valid(ResolverStyle style, JapaneseEra era) { in test_resolve_yearOfEra_eraAndYearOnly_valid() argument 764 JapaneseDate date = JapaneseChronology.INSTANCE.resolveDate(fieldValues, style); in test_resolve_yearOfEra_eraAndYearOnly_valid() 775 for (ResolverStyle style : ResolverStyle.values()) { in data_resolve_styles() 776 result[i++] = new Object[] {style}; in data_resolve_styles() [all …]
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | DateFormatTest.java | 50 private static void checkTimePattern(int style, String expectedPattern) { in checkTimePattern() argument 53 DateFormat format = DateFormat.getTimeInstance(style, locale); in checkTimePattern()
|
/libcore/luni/src/main/java/libcore/icu/ |
D | TimeZoneNames.java | 125 …blic static String getDisplayName(String[][] zoneStrings, String id, boolean daylight, int style) { in getDisplayName() argument 131 return (style == TimeZone.LONG) ? row[LONG_NAME_DST] : row[SHORT_NAME_DST]; in getDisplayName() 133 return (style == TimeZone.LONG) ? row[LONG_NAME] : row[SHORT_NAME]; in getDisplayName()
|
/libcore/ojluni/annotations/mmodule/java/text/ |
D | DateFormat.annotated.java | 68 public static final java.text.DateFormat getTimeInstance(int style) { throw new RuntimeException("S… in getTimeInstance() argument 70 public static final java.text.DateFormat getTimeInstance(int style, java.util.Locale aLocale) { thr… in getTimeInstance() argument 74 public static final java.text.DateFormat getDateInstance(int style) { throw new RuntimeException("S… in getDateInstance() argument 76 public static final java.text.DateFormat getDateInstance(int style, java.util.Locale aLocale) { thr… in getDateInstance() argument
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
D | Era.java | 320 default String getDisplayName(TextStyle style, Locale locale) { in getDisplayName() argument 321 … return new DateTimeFormatterBuilder().appendText(ERA, style).toFormatter(locale).format(this); in getDisplayName()
|
/libcore/ojluni/annotations/hiddenapi/java/text/ |
D | DateFormat.java | 81 public static final java.text.DateFormat getTimeInstance(int style) { in getTimeInstance() argument 85 public static final java.text.DateFormat getTimeInstance(int style, java.util.Locale aLocale) { in getTimeInstance() argument 93 public static final java.text.DateFormat getDateInstance(int style) { in getDateInstance() argument 97 public static final java.text.DateFormat getDateInstance(int style, java.util.Locale aLocale) { in getDateInstance() argument
|
/libcore/ojluni/src/main/java/java/time/ |
D | DayOfWeek.java | 226 public String getDisplayName(TextStyle style, Locale locale) { in getDisplayName() argument 227 …return new DateTimeFormatterBuilder().appendText(DAY_OF_WEEK, style).toFormatter(locale).format(th… in getDisplayName()
|