Sub-classes may override this method to return a Calendar instance not based on the system date. Doing so will also cause the getDate , get String , get String,String , and toString methods to return dates equivalent to the Calendar returned by this method, because those methods return values derived from the result of this method.
If the format fits neither of these patterns, then the output will be formatted according to the symbols defined by SimpleDateFormat. All rights reserved. Skip navigation links. Object org. SafeConfig org. LocaleConfig org. FormatConfig org. Converts the specified object to a date and formats it according to the pattern or style returned by FormatConfig. Converts the specified object to a date and returns a formatted string representing that date in the locale returned by LocaleConfig. Converts the specified object to a date and returns a formatted string representing that date in the specified Locale.
Returns a formatted string representing the specified date, Locale , and TimeZone. String format, java. Object obj Converts the specified object to a date and returns a formatted string representing that date in the locale returned by getLocale. Object obj, java. Locale locale Converts the specified object to a date and returns a formatted string representing that date in the specified Locale.
Locale locale, java. String dateStyle, java. String timeStyle, java. String get java. String format Returns a formatted string representing the date returned by getDate. Calendar getCalendar Returns a Calendar instance created using the timezone and locale returned by getTimeZone and getLocale. Date getDate Returns a Date derived from the result of getCalendar protected java. DateFormat getDateFormat java.
Integer getDay Returns the day of the month value of the date returned by getCalendar. Integer getDay java. Object date Returns the day of the month value for the specified date. String getFormat Return the pattern or style to be used for formatting dates when none is specified.
Locale getLocale This implementation returns the configured default locale. Integer getMonth Returns the month value of the date returned by getCalendar. Integer getMonth java. Object date Returns the month value of the specified date. Calendar getSystemCalendar static java.
Date getSystemDate static long getSystemTime java. Integer getValue int field, java. Object date Returns the specified value of the specified date, or null if the field or date is invalid.
Integer getValue java. Object field Return the specified value of the date returned by getCalendar or null if the field is invalid. Object field, java. Object date Returns the year value of the specified date. TimeZone timezone java. Calendar toCalendar java. Object obj Converts an object to an instance of Calendar using the locale returned by LocaleConfig.
Locale locale Converts an object to an instance of Calendar using the locale returned by LocaleConfig. Date toDate java. Object obj Converts an object to an instance of Date using the format returned by FormatConfig.
Object obj Converts an object to an instance of Date using the specified format,the Locale returned by LocaleConfig. Locale locale Converts an object to an instance of Date using the specified format and Locale if the object is not already an instance of Date, Calendar, or Long. TimeZone timezone Converts an object to an instance of Date using the specified format, Locale , and TimeZone if the object is not already an instance of Date, Calendar, or Long.
String toString Methods inherited from class org. FormatConfig getFormat , setFormat Methods inherited from class org. LocaleConfig getLocale , setLocale Methods inherited from class org. See Also: Constant Field Values timezone private java.
This is protected, so subclasses may share the same ValueParser and call configure at any time, while preventing templates from doing so when configure Map is locked. Default value is from TimeZone. Returns: the configured TimeZone getDate public java.
This allows subclasses to easily override the default locale and timezone used by this tool. Sub-classes may override this method to return a Calendar instance not based on the system date. Doing so will also cause the getDate , get String , get String,String , and toString methods to return dates equivalent to the Calendar returned by this method, because those methods return values derived from the result of this method.
See Also: Calendar. NOTE: Unlike java. Date, this returns the day of the month. It is equivalent to Date.
0コメント