Package com.google.gson.internal
Class PreJava9DateFormatProvider
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 TypeMethodDescriptionstatic 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.
-