public class Strftime
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| protected java.text.SimpleDateFormat | simpleDateFormat | 
| protected static java.util.Properties | translate | 
| Constructor and Description | 
|---|
| Strftime(java.lang.String origFormat)Create an instance of this date formatting class | 
| Strftime(java.lang.String origFormat,
java.util.Locale locale)Create an instance of this date formatting class | 
| Modifier and Type | Method and Description | 
|---|---|
| protected java.lang.String | convertDateFormat(java.lang.String pattern)Search the provided pattern and get the C standard
Date/Time formatting rules and convert them to the
Java equivalent. | 
| java.lang.String | format(java.util.Date date)Format the date according to the strftime-style string given in the constructor. | 
| java.util.TimeZone | getTimeZone()Get the timezone used for formatting conversions | 
| protected java.lang.String | quote(java.lang.String str,
boolean insideQuotes) | 
| void | setTimeZone(java.util.TimeZone timeZone)Change the timezone used to format dates | 
| protected boolean | translateCommand(java.lang.StringBuilder buf,
java.lang.String pattern,
int index,
boolean oldInside)Try to get the Java Date/Time formatting associated with
the C standard provided. | 
protected static java.util.Properties translate
protected java.text.SimpleDateFormat simpleDateFormat
public Strftime(java.lang.String origFormat)
Strftime( String, Locale )public Strftime(java.lang.String origFormat,
        java.util.Locale locale)
origFormat - the strftime-style formatting stringlocale - the locale to use for locale-specific conversionspublic java.lang.String format(java.util.Date date)
date - the date to formatpublic java.util.TimeZone getTimeZone()
public void setTimeZone(java.util.TimeZone timeZone)
DateFormat.setTimeZone(java.util.TimeZone)protected java.lang.String convertDateFormat(java.lang.String pattern)
pattern - The pattern to searchprotected java.lang.String quote(java.lang.String str,
                     boolean insideQuotes)
protected boolean translateCommand(java.lang.StringBuilder buf,
                       java.lang.String pattern,
                       int index,
                       boolean oldInside)
buf - The bufferpattern - The date/time patternindex - The char indexoldInside - Flag valueCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.