| 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: 1.2 $, $Date: 2002/05/11 05:43:56 $ |
Strftime | public Strftime(String origFormat, Locale locale)(Code) | | Create an instance of this date formatting class
Parameters: origFormat - the strftime-style formatting string Parameters: 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 formating associated with
the C standard provided
Parameters: c - The C equivalent to translate The Java formatting rule to use |
|
|