Class Date

    • Method Detail

      • fromYearMonthDay

        public static Date fromYearMonthDay​(int year,
                                            int month,
                                            int dayOfMonth)
        Constructs a new Date instance.
        Parameters:
        year - must be greater than 0
        month - must be between [1,12]
        dayOfMonth - must be between [1,31]
      • parseDate

        public static Date parseDate​(String date)
        Parameters:
        date - Data in RFC 3339 date format (yyyy-mm-dd).
      • toJavaUtilDate

        public static Date toJavaUtilDate​(Date date)
        Convert a Google Date to a Java Util Date.
        Parameters:
        date - the date of the Google Date.
        Returns:
        java.util.Date
      • fromJavaUtilDate

        public static Date fromJavaUtilDate​(Date date)
        Convert a Java Util Date to a Google Date.
        Parameters:
        date - the date of the java.util.Date
        Returns:
        Google Java Date
      • getYear

        public int getYear()
        Returns the year.
      • getMonth

        public int getMonth()
        Returns the month between 1 and 12 inclusive.
      • getDayOfMonth

        public int getDayOfMonth()
        Returns day of month between 1 and 31 inclusive.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object