Package org.zkoss.text
Interface DateFormatInfo
-
public interface DateFormatInfoThe format information for date/time. It is used withDateFormats.setLocalFormatInfo(org.zkoss.text.DateFormatInfo)to provide the format information for different styling and locales.- Since:
- 5.0.7
- Author:
- tomyeh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetDateFormat(int style, java.util.Locale locale)Return the date format of the given style and locale, or null if the default one shall be used.java.lang.StringgetDateTimeFormat(int dateStyle, int timeStyle, java.util.Locale locale)Return the date/time format of the given style and locale, or null if the default one shall be used.java.lang.StringgetTimeFormat(int style, java.util.Locale locale)Return the time format of the given style and locale, or null if the default one shall be used.
-
-
-
Method Detail
-
getDateFormat
java.lang.String getDateFormat(int style, java.util.Locale locale)Return the date format of the given style and locale, or null if the default one shall be used.- Parameters:
style- the giving formatting style (never null). For example,DateFormat.SHORTfor "M/d/yy" in the US locale.locale- the locale (never null).
-
getTimeFormat
java.lang.String getTimeFormat(int style, java.util.Locale locale)Return the time format of the given style and locale, or null if the default one shall be used.- Parameters:
style- the giving formatting style (never null). For example,DateFormat.SHORTfor "h:mm a" in the US locale.locale- the locale (never null).
-
getDateTimeFormat
java.lang.String getDateTimeFormat(int dateStyle, int timeStyle, java.util.Locale locale)Return the date/time format of the given style and locale, or null if the default one shall be used.- Parameters:
dateStyle- the giving formatting style (never null). For example,DateFormat.SHORTfor "M/d/yy" in the US locale.timeStyle- the giving formatting style (never null). For example,DateFormat.SHORTfor "h:mm a" in the US locale.locale- the locale (never null).
-
-