Package org.apache.poi.util
Class DateTimeFormatUtils
- java.lang.Object
-
- org.apache.poi.util.DateTimeFormatUtils
-
public class DateTimeFormatUtils extends Object
Utils for Datetime, since locale provider has changed from java 9. (Deprecated) Note: It's recommended to specify the VM option with-Djava.locale.providers=JRE,CLDR
. Because it's not only affected to Date Time Format, other Formats may be changed as well.- Since:
- 5.5.0
-
-
Constructor Summary
Constructors Constructor Description DateTimeFormatUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DateFormat
getDateFormat(int style, Locale locale)
Returns the conditioned date format according to java version.static DateFormat
getDateInstance(int dateStyle, Locale locale)
static DateFormat
getDateTimeFormat(int style, int timeStyle, Locale locale)
Returns the conditioned datetime format according to java version.static DateFormat
getTimeInstance(int timeStyle, Locale locale)
-
-
-
Method Detail
-
getDateInstance
public static DateFormat getDateInstance(int dateStyle, Locale locale)
-
getTimeInstance
public static DateFormat getTimeInstance(int timeStyle, Locale locale)
-
getDateFormat
public static DateFormat getDateFormat(int style, Locale locale)
Returns the conditioned date format according to java version.- Parameters:
style
-locale
-- Returns:
- dateFormat
-
getDateTimeFormat
public static DateFormat getDateTimeFormat(int style, int timeStyle, Locale locale)
Returns the conditioned datetime format according to java version.- Parameters:
style
-timeStyle
-locale
-- Returns:
- dateFormat
-
-