|
Project Wonder 5.0 | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.text.Format
java.text.DateFormat
java.text.SimpleDateFormat
er.chronic.ChronicFormatter
public class ChronicFormatter
ChronicFormatter attempts to parse a date using an expected date format, and then falls back to using Chronic in the event of a parse failure.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.text.DateFormat |
---|
java.text.DateFormat.Field |
Field Summary |
---|
Fields inherited from class java.text.DateFormat |
---|
AM_PM_FIELD, calendar, DATE_FIELD, DAY_OF_WEEK_FIELD, DAY_OF_WEEK_IN_MONTH_FIELD, DAY_OF_YEAR_FIELD, DEFAULT, ERA_FIELD, FULL, HOUR_OF_DAY0_FIELD, HOUR_OF_DAY1_FIELD, HOUR0_FIELD, HOUR1_FIELD, LONG, MEDIUM, MILLISECOND_FIELD, MINUTE_FIELD, MONTH_FIELD, numberFormat, SECOND_FIELD, SHORT, TIMEZONE_FIELD, WEEK_OF_MONTH_FIELD, WEEK_OF_YEAR_FIELD, YEAR_FIELD |
Constructor Summary | |
---|---|
ChronicFormatter(java.lang.String pattern)
Constructs a new ChronicFormatter. |
|
ChronicFormatter(java.lang.String pattern,
Options options)
Constructs a new ChronicFormatter. |
|
ChronicFormatter(java.lang.String pattern,
Options options,
boolean guessingEarly)
Constructs a new ChronicFormatter. |
Method Summary | |
---|---|
boolean |
isGuessingEarly()
Returns whether or not this parser guesses the beginning of a span if a date parses as a span. |
Options |
options()
Returns the options used by this formatter. |
com.webobjects.foundation.NSTimestamp |
parseObject(java.lang.String text)
|
void |
setGuessingEarly(boolean guessingEarly)
Sets whether or not this parser guesses the beginning of a span if a date parses as a span. |
void |
setOptions(Options options)
Sets the options used by this formatter. |
Methods inherited from class java.text.SimpleDateFormat |
---|
applyLocalizedPattern, applyPattern, clone, equals, format, formatToCharacterIterator, get2DigitYearStart, getDateFormatSymbols, hashCode, parse, set2DigitYearStart, setDateFormatSymbols, toLocalizedPattern, toPattern |
Methods inherited from class java.text.DateFormat |
---|
format, format, getAvailableLocales, getCalendar, getDateInstance, getDateInstance, getDateInstance, getDateTimeInstance, getDateTimeInstance, getDateTimeInstance, getInstance, getNumberFormat, getTimeInstance, getTimeInstance, getTimeInstance, getTimeZone, isLenient, parse, parseObject, setCalendar, setLenient, setNumberFormat, setTimeZone |
Methods inherited from class java.text.Format |
---|
format |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChronicFormatter(java.lang.String pattern)
pattern
- the SimpleDateFormat pattern to parseoptions
- the chronic options to parse withpublic ChronicFormatter(java.lang.String pattern, Options options)
pattern
- the SimpleDateFormat pattern to parseoptions
- the chronic options to parse withpublic ChronicFormatter(java.lang.String pattern, Options options, boolean guessingEarly)
pattern
- the SimpleDateFormat pattern to parseoptions
- the chronic options to parse withguessingEarly
- if true, guess the start of a span if the parsed date returns a spanMethod Detail |
---|
public Options options()
public void setOptions(Options options)
options
- the options used by this formatterpublic boolean isGuessingEarly()
public void setGuessingEarly(boolean guessingEarly)
guessingEarly
- whether or not this parser guesses the beginning of a spanpublic com.webobjects.foundation.NSTimestamp parseObject(java.lang.String text) throws java.text.ParseException
parseObject
in class java.text.Format
java.text.ParseException
|
Last updated: Tue, Feb 21, 2017 05:45 PM CET | |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |