Class DateOnly

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

public class DateOnly extends Object
A timezone-nonspecific date
  • 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

    • parse

      @Nullable public static DateOnly parse(@Nonnull String dateStr) throws ParseException
      Constructs a timezone-nonspecific DateOnly
      Parameters:
      dateStr - date string of the form yyyy-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

      public String toString()
      Overrides:
      toString in class Object