public class DateOnly
extends java.lang.Object
| Constructor and Description |
|---|
DateOnly(int year,
int month,
int day)
Constructs a timezone-nonspecific DateOnly
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDay()
Gets the day
|
int |
getMonth()
Gets the month
|
int |
getYear()
Gets the year
|
static DateOnly |
parse(java.lang.String dateStr)
Constructs a timezone-nonspecific DateOnly
|
java.lang.String |
toString() |
public DateOnly(int year,
int month,
int day)
year - the yearmonth - 1-indexed month value (Jan == 1)day - day of the monthpublic static DateOnly parse(java.lang.String dateStr) throws java.text.ParseException
dateStr - date string of the form yyyy-mm-ddjava.text.ParseException - If there was a failure parsing the dateStrpublic int getYear()
public int getMonth()
public int getDay()
public java.lang.String toString()
toString in class java.lang.Object