|
Joda Time API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Converts sequences of human-readable characters into datetimes.
DateTimeFormatter,
DateTimeFormatterBuilder,
DateTimeFormat| Method Summary | |
int |
estimateParsedLength()
Returns the expected maximum number of characters consumed. |
Chronology |
getChronology()
Returns the Chronology being used by the parser, or null if none. |
DateTime |
parseDateTime(java.lang.String text)
Parses a datetime from the given text, returning a new DateTime. |
int |
parseInto(DateTimeParserBucket bucket,
java.lang.String text,
int position)
Parse an element from the given text, saving any fields into the given DateTimeParserBucket. |
int |
parseInto(ReadWritableInstant instant,
java.lang.String text,
int position)
Parses a datetime from the given text, at the given position, saving the result into the fields of the given ReadWritableInstant. |
long |
parseMillis(java.lang.String text)
Parses a datetime from the given text, returning the number of milliseconds since the epoch, 1970-01-01T00:00:00Z. |
long |
parseMillis(java.lang.String text,
long millis)
Parses a datetime from the given text, at the given position, returning the number of milliseconds since the epoch, 1970-01-01T00:00:00Z. |
MutableDateTime |
parseMutableDateTime(java.lang.String text)
Parses a datetime from the given text, returning a new MutableDateTime. |
| Method Detail |
public Chronology getChronology()
public int estimateParsedLength()
public int parseInto(DateTimeParserBucket bucket,
java.lang.String text,
int position)
If it fails, the return value is negative. To determine the position where the parse failed, apply the one's complement operator (~) on the return value.
bucket - field are saved into thistext - the text to parseposition - position to start parsing from
java.lang.IllegalArgumentException - if any field is out of range
public int parseInto(ReadWritableInstant instant,
java.lang.String text,
int position)
If it fails, the return value is negative, but the instant may still be modified. To determine the position where the parse failed, apply the one's complement operator (~) on the return value.
instant - an instant that will be modifiedtext - text to parseposition - position to start parsing from
java.lang.IllegalArgumentException - if any field is out of range
public long parseMillis(java.lang.String text)
throws java.text.ParseException
text - text to parse
java.text.ParseException - if any field is out of range
public long parseMillis(java.lang.String text,
long millis)
throws java.text.ParseException
text - text to parsemillis - initial value of millis, relative to the epoch, local time
java.text.ParseException - if any field is out of range
public DateTime parseDateTime(java.lang.String text)
throws java.text.ParseException
text - text to parse
java.text.ParseException - if any field is out of range
public MutableDateTime parseMutableDateTime(java.lang.String text)
throws java.text.ParseException
text - text to parse
java.text.ParseException - if any field is out of range
|
Joda Time API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||