DateOnly Class

  • java.lang.Object
    • com.microsoft.graph.core.DateOnly

public class DateOnly

A timezone-nonspecific date

Constructor Summary

Constructor Description
DateOnly(int year, int month, int day)

Constructs a timezone-nonspecific DateOnly

Method Summary

Modifier and Type Method and Description
int getDay()

Gets the day

int getMonth()

Gets the month

int getYear()

Gets the year

static DateOnly parse(String dateStr)

Constructs a timezone-nonspecific DateOnly

java.lang.String toString()

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

DateOnly

public DateOnly(int year, int month, int day)

Constructs a timezone-nonspecific DateOnly

Parameters:

year - the year
month - 1-indexed month value (Jan == 1)
day - day of the month

Method Details

getDay

public int getDay()

Gets the day

Returns:

the day

getMonth

public int getMonth()

Gets the month

Returns:

the month

getYear

public int getYear()

Gets the year

Returns:

the year

parse

public static DateOnly parse(String dateStr)

Constructs a timezone-nonspecific DateOnly

Parameters:

dateStr - date string of the form yyyy-mm-dd

Returns:

the parsed DateOnly instance

Throws:

java.text.ParseException

toString

public String toString()

Overrides:

DateOnly.toString()

Applies to