Top Description Constructors Methods
com.google.gson.internal

public Class PreJava9DateFormatProvider

extends Object
Class Inheritance
Imports
java.text.DateFormat, .SimpleDateFormat, java.util.Locale

Provides DateFormats for US locale with patterns which were the default ones before Java 9.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static String
private static String
public static DateFormat
getUsDateTimeFormat(int dateStyle, int timeStyle)

Returns the same DateFormat as DateFormat.getDateTimeInstance(dateStyle, timeStyle, Locale.US) in Java 8 or below.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PreJava9DateFormatProviderback to summary
private PreJava9DateFormatProvider()

Method Detail

getDatePartOfDateTimePatternback to summary
private static String getDatePartOfDateTimePattern(int dateStyle)
getTimePartOfDateTimePatternback to summary
private static String getTimePartOfDateTimePattern(int timeStyle)
getUsDateTimeFormatback to summary
public static DateFormat getUsDateTimeFormat(int dateStyle, int timeStyle)

Returns the same DateFormat as DateFormat.getDateTimeInstance(dateStyle, timeStyle, Locale.US) in Java 8 or below.