Class SimpleDate
java.lang.Object
com.nimbusds.oauth2.sdk.util.date.SimpleDate
Simple date. Supports ISO 8601 formatting and parsing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetDay()Returns the day of the month.intgetMonth()Returns the month.intgetYear()Returns the year.inthashCode()static SimpleDateParses an ISO 8601 representation inYYYY-MM-DDformat.Returns an ISO 8601 representation inYYYY-MM-DDformat.toString()
-
Constructor Details
-
SimpleDate
Creates a new simple date. No validation of month and day is performed.- Parameters:
year- The year.month- The month.day- The day of the month.
-
-
Method Details
-
getYear
Returns the year.- Returns:
- The year.
-
getMonth
Returns the month.- Returns:
- The month.
-
getDay
Returns the day of the month.- Returns:
- The day of the month.
-
toISO8601String
Returns an ISO 8601 representation inYYYY-MM-DDformat.Example:
2019-11-01- Returns:
- The ISO 8601 representation.
-
toString
-
equals
-
hashCode
-
parseISO8601String
Parses an ISO 8601 representation inYYYY-MM-DDformat.Example:
2019-11-01- Parameters:
s- The string to parse.- Returns:
- The simple date.
- Throws:
ParseException- If parsing failed.
-