| java.lang.Object org.apache.catalina.util.Strftime
Strftime | public class Strftime (Code) | | Converts dates to strings using the same format specifiers as strftime
Note: This does not mimic strftime perfectly. Certain strftime commands,
are not supported, and will convert as if they were literals.
Certain complicated commands, like those dealing with the week of the year
probably don't have exactly the same behavior as strftime.
These limitations are due to use SimpleDateTime. If the conversion was done
manually, all these limitations could be eliminated.
The interface looks like a subset of DateFormat. Maybe someday someone will make this class
extend DateFormat.
author: Bip Thelin author: Dan Sandberg version: $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $ |
Strftime | public Strftime(String origFormat, Locale locale)(Code) | | Create an instance of this date formatting class
Parameters: origFormat - the strftime-style formatting string Parameters: locale - the locale to use for locale-specific conversions |
convertDateFormat | protected String convertDateFormat(String pattern)(Code) | | Search the provided pattern and get the C standard
Date/Time formatting rules and convert them to the
Java equivalent.
Parameters: pattern - The pattern to search The modified pattern |
format | public String format(Date date)(Code) | | Format the date according to the strftime-style string given in the constructor.
Parameters: date - the date to format the formatted date |
getTimeZone | public TimeZone getTimeZone()(Code) | | Get the timezone used for formatting conversions
the timezone |
translateCommand | protected boolean translateCommand(StringBuffer buf, String pattern, int index, boolean oldInside)(Code) | | Try to get the Java Date/Time formatting associated with
the C standard provided.
Parameters: buf - The buffer Parameters: pattern - The date/time pattern Parameters: index - The char index Parameters: oldInside - Flag value True if new is inside buffer |
|
|