SimpleDate

com.google.api.server.spi.types

Class SimpleDate

  • java.lang.Object
    • com.google.api.server.spi.types.SimpleDate


  • public class SimpleDate
    extends java.lang.Object
    A class for storing simple date values without a time component.
    • Constructor Summary

      Constructors 
      Constructor and Description
      SimpleDate(int year, int month, int day)
      Constructs a new simple date.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object obj) 
      int getDay()
      Gets the calendar day; this should be between 1 and 31.
      int getMonth()
      Gets the calendar month number.
      int getYear()
      Gets the calendar year.
      int hashCode() 
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SimpleDate

        public SimpleDate(int year,
                          int month,
                          int day)
        Constructs a new simple date.
        Parameters:
        year - the full year number
        month - a month number between 1-12
        day - a day number between 1-31
        Throws:
        java.lang.IllegalArgumentException - throws if the date is invalid, or the year is outside the RFC3339 supported range
    • Method Detail

      • getYear

        public int getYear()
        Gets the calendar year.
        Returns:
        the full year number
      • getMonth

        public int getMonth()
        Gets the calendar month number. This would return 1 for January, and 12 for December.
        Returns:
        the month number
      • getDay

        public int getDay()
        Gets the calendar day; this should be between 1 and 31.
        Returns:
        the day number
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Endpoints Frameworks for App Engine