Package com.google.gson.internal
Class PreJava9DateFormatProvider
- java.lang.Object
-
- com.google.gson.internal.PreJava9DateFormatProvider
-
public class PreJava9DateFormatProvider extends java.lang.ObjectProvides DateFormats for US locale with patterns which were the default ones before Java 9.
-
-
Constructor Summary
Constructors Constructor Description PreJava9DateFormatProvider()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.text.DateFormatgetUSDateFormat(int style)Returns the same DateFormat asDateFormat.getDateInstance(style, Locale.US)in Java 8 or below.static java.text.DateFormatgetUSDateTimeFormat(int dateStyle, int timeStyle)Returns the same DateFormat asDateFormat.getDateTimeInstance(dateStyle, timeStyle, Locale.US)in Java 8 or below.
-
-
-
Method Detail
-
getUSDateFormat
public static java.text.DateFormat getUSDateFormat(int style)
Returns the same DateFormat asDateFormat.getDateInstance(style, Locale.US)in Java 8 or below.
-
getUSDateTimeFormat
public static java.text.DateFormat getUSDateTimeFormat(int dateStyle, int timeStyle)Returns the same DateFormat asDateFormat.getDateTimeInstance(dateStyle, timeStyle, Locale.US)in Java 8 or below.
-
-