jodd.datetime.format
Class Iso8601JdtFormatter
java.lang.Object
jodd.datetime.format.AbstractFormatter
jodd.datetime.format.Iso8601JdtFormatter
- All Implemented Interfaces:
- JdtFormatter
public class Iso8601JdtFormatter
- extends AbstractFormatter
Default JdtFormatter uses ISO 8601 specification, enhanced by some
custom patterns. For more information see:
ISO 8601 on Wikipedia
Patterns list:
- YYYY + year
- MM + month
- DD + day of month
- D - day of week
- MML - month name (add-on)
- MMS - month abbreviation (add-on)
- DL - day of week name (add-on)
- DS - day of week abbreviation (add-on)
- hh + hour
- mm + minute
- ss + seconds (no milliseconds)
- mss + milliseconds (add-on)
- DDD - day of year
- WW - week of year
- WWW - week of year with 'W' prefix
- W - week of month (add-on)
- E - era
- TLZ - time zone long
- TLS - time zone short
Patterns noted with + sign are used both for conversion and parsing.
All patterns are used for conversion.
|
Method Summary |
protected java.lang.String |
convertPattern(int patternIndex,
JDateTime jdt)
Creates a date-time string for founded pattern. |
protected void |
parseValue(int patternIndex,
java.lang.String value,
DateTimeStamp destination)
Parses value for matched pattern. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Iso8601JdtFormatter
public Iso8601JdtFormatter()
convertPattern
protected java.lang.String convertPattern(int patternIndex,
JDateTime jdt)
- Description copied from class:
AbstractFormatter
- Creates a date-time string for founded pattern. Founded patterns
is identified by its
AbstractFormatter.patterns index.
- Specified by:
convertPattern in class AbstractFormatter
- Parameters:
patternIndex - index of founded patternjdt - date time information
parseValue
protected void parseValue(int patternIndex,
java.lang.String value,
DateTimeStamp destination)
- Description copied from class:
AbstractFormatter
- Parses value for matched pattern. Founded patterns
is identified by its
AbstractFormatter.patterns index.
Note that value may represent both integer and decimals.
May throw NumberFormatException.
- Specified by:
parseValue in class AbstractFormatter
- Parameters:
patternIndex - index of founded patternvalue - value to parse, no spaces or tabsdestination - destination to modify
Copyright © 2003-2012 Jodd Team