|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DayDateFactory
Factory for creating DayDate
objects.
Method Summary | |
---|---|
DayDate |
deserialize(String date)
Creates a new DayDate object with date of the given string
serialization, as returned by DayDate.serialize() |
DayDate |
fromInt(int date)
Converts an int , as returned from DayDate.toInt() to
a DayDate object. |
DayDate |
getDefault()
Returns a default date value: 1970-01-01 (the UNIX epoch date). |
DayDate |
now()
|
DayDate |
parse(int year,
int month,
int day)
Creates a new DayDate object, if possible, from the given
parameters. |
DayDate |
parse(String date)
Creates a new DayDate object, if possible, from the given
string representation. |
DayDate |
parse(String year,
String month,
String day)
Creates a new DayDate object, if possible, from the given
parameters. |
DayDate |
utc()
|
Method Detail |
---|
DayDate now()
DayDate utc()
DayDate getDefault()
null
values.
DayDate deserialize(String date) throws IllegalArgumentException
DayDate
object with date of the given string
serialization, as returned by DayDate.serialize()
date
- The string serialization of the date, on the format
YYYYMMDD
.
IllegalArgumentException
- If the given string serialization does
not represent a correct date.DayDate parse(String year, String month, String day)
DayDate
object, if possible, from the given
parameters. If the given parameters do not represent a date,
null
is returned. This is the case even if the parameters
are totally wrong (i.e. not number, out of range, null etc etc) - no
exception is ever thrown.
year
- The year in the range 1000-9999.month
- The month in the range 1-12.day
- The day in the range 1-28, 1-29, 1-30 or 1-31 depending on
month and year.
null
if the provided parameters
do not represent a correct date.DayDate parse(int year, int month, int day)
DayDate
object, if possible, from the given
parameters. If the given parameters do not represent a date,
null
is returned. This is the case even if the parameters
are totally wrong (i.e. not number, out of range, null etc etc) - no
exception is ever thrown.
year
- The year in the range 1000-9999.month
- The month in the range 1-12.day
- The day in the range 1-28, 1-29, 1-30 or 1-31 depending on
month and year.
null
if the provided parameters
do not represent a correct date.DayDate parse(String date)
DayDate
object, if possible, from the given
string representation. If the given representation do not represent a
date, null
is returned.
date
- The date, represented as a string on one of the formats
YYYYMMDD
and YYYY-MM-DD
.
null
if the provided string
representation does not represent a correct date.DayDate fromInt(int date) throws IllegalArgumentException
int
, as returned from DayDate.toInt()
to
a DayDate
object.
date
- The int
value.
IllegalArgumentException
- If the given int
value
does not correctly represent a date.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |