java.lang.Object
dev.katsute.mal4j.property.NullableDate
A date with an optional year, month, and day. Does not convert around timezones, will return the date exactly how it is written on the website.
- Since:
- 3.0.0
- Version:
- 3.0.0
- Author:
- Katsute
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Date
getDate()
Returns the date as aDate
.abstract Integer
getDay()
Returns the day (1-31).abstract Long
Returns the date as milliseconds since epoch.abstract Integer
getMonth()
Returns the numeric month (1-12).abstract Integer
getYear()
Returns the 4 digit year (19XX-20XX).
-
Constructor Details
-
NullableDate
public NullableDate()
-
-
Method Details
-
getYear
Returns the 4 digit year (19XX-20XX). Null if the year is missing- Returns:
- year
- Since:
- 3.0.0
-
getMonth
Returns the numeric month (1-12). Null if the month is missing.- Returns:
- month
- Since:
- 3.0.0
-
getDay
Returns the day (1-31). Null if the day is missing.- Returns:
- day
- Since:
- 3.0.0
-
getMillis
Returns the date as milliseconds since epoch. If the month or day is null, it will fallback to January 1st. Null if everything is missing.- Returns:
- milliseconds since epoch
- Since:
- 3.0.0
-
getDate
Returns the date as aDate
. If the month or day is null, it will fallback to January 1st. Null if everything is missing.- Returns:
- date
- Since:
- 3.0.0
- See Also:
-