Package com.microsoft.graph.core
Class DateOnly
java.lang.Object
com.microsoft.graph.core.DateOnly
A timezone-nonspecific date
-
Constructor Summary
ConstructorsConstructorDescriptionDateOnly(int year, int month, int day)Constructs a timezone-nonspecific DateOnly -
Method Summary
-
Constructor Details
-
DateOnly
public DateOnly(int year, int month, int day)Constructs a timezone-nonspecific DateOnly- Parameters:
year- the yearmonth- 1-indexed month value (Jan == 1)day- day of the month
-
-
Method Details
-
parse
Constructs a timezone-nonspecific DateOnly- Parameters:
dateStr- date string of the formyyyy-mm-dd- Returns:
- the parsed DateOnly instance
- Throws:
ParseException- If there was a failure parsing the dateStr
-
getYear
public int getYear()Gets the year- Returns:
- the year
-
getMonth
public int getMonth()Gets the month- Returns:
- the month
-
getDay
public int getDay()Gets the day- Returns:
- the day
-
toString
-