java.lang.Object
com.google.gson.internal.PreJava9DateFormatProvider
Provides DateFormats for US locale with patterns which were the default ones before Java 9.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
getDateFormatPattern
(int style) private static String
getDatePartOfDateTimePattern
(int dateStyle) private static String
getTimePartOfDateTimePattern
(int timeStyle) static DateFormat
getUSDateFormat
(int style) Returns the same DateFormat asDateFormat.getDateInstance(style, Locale.US)
in Java 8 or below.static DateFormat
getUSDateTimeFormat
(int dateStyle, int timeStyle) Returns the same DateFormat asDateFormat.getDateTimeInstance(dateStyle, timeStyle, Locale.US)
in Java 8 or below.
-
Constructor Details
-
PreJava9DateFormatProvider
public PreJava9DateFormatProvider()
-
-
Method Details
-
getUSDateFormat
Returns the same DateFormat asDateFormat.getDateInstance(style, Locale.US)
in Java 8 or below. -
getUSDateTimeFormat
Returns the same DateFormat asDateFormat.getDateTimeInstance(dateStyle, timeStyle, Locale.US)
in Java 8 or below. -
getDateFormatPattern
-
getDatePartOfDateTimePattern
-
getTimePartOfDateTimePattern
-