public interface TemporalParser extends Parsable<TemporalAccessor>
Modifier and Type | Method and Description |
---|---|
ParseResult<TemporalAccessor> |
parse(Integer year,
Integer dayOfYear)
Parse year, dayOfYear integers as a TemporalAccessor.
|
ParseResult<TemporalAccessor> |
parse(Integer year,
Integer month,
Integer day)
Parse year, month, day integers as a TemporalAccessor.
|
ParseResult<TemporalAccessor> |
parse(String input)
Parse a date represented as a single String into a TemporalAccessor.
|
ParseResult<TemporalAccessor> |
parse(String input,
DateComponentOrdering ordering)
Parse a String date restricted to the
ordering provided. |
ParseResult<TemporalAccessor> |
parse(String input,
DateComponentOrdering[] orderings)
Parse a String date to a TemporalAccessor, attempting unambiguous formats and the
orderings provided. |
ParseResult<TemporalAccessor> |
parse(String year,
String dayOfYear)
Parse year, dayOfYear strings as a TemporalAccessor.
|
ParseResult<TemporalAccessor> |
parse(String year,
String month,
String day)
Parse year, month, day strings as a TemporalAccessor.
|
ParseResult<TemporalAccessor> parse(String input)
parse
in interface Parsable<TemporalAccessor>
input
- ParseResult<TemporalAccessor> parse(String input, @Nullable DateComponentOrdering ordering)
ordering
provided.
Set a general date ordering for the parsing. For example, DMY will support both 14.08.2020 and
14/08/2020, but not 2020-08-14 or 08/14/2020.
NOTE, this behaviour differs from parse(String, DateComponentOrdering[])
.ordering
- required date ordering.ParseResult<TemporalAccessor> parse(String input, @Nullable DateComponentOrdering[] orderings)
orderings
provided.
The date 2020-08-14 will always parse. An ordering
of DMY_FORMATS will also
support 14.08.2020, 14/08/2020 and 14/08/2020 14:11:00, but not 08/14/2020.
NOTE, this behaviour differs from parse(String, DateComponentOrdering)
.orderings
- required general date orderingsParseResult<TemporalAccessor> parse(@Nullable String year, @Nullable String month, @Nullable String day)
year
- numerical value of a yearmonth
- value of the mont depending on the implementation, numerical value of a
month (starting at 1 for January) or possibly text.day
- numerical value of a dayParseResult<TemporalAccessor> parse(@Nullable Integer year, @Nullable Integer month, @Nullable Integer day)
year
- numerical value of a yearmonth
- numerical value of a month (starting at 1 for January)day
- numerical value of a dayParseResult<TemporalAccessor> parse(@Nullable String year, @Nullable String dayOfYear)
year
- numerical value of a yeardayOfYear
- numerical value of a day of the yearParseResult<TemporalAccessor> parse(@Nullable Integer year, @Nullable Integer dayOfYear)
year
- numerical value of a yeardayOfYear
- numerical value of a day of the yearCopyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.