@BetaApi(value="This is going to be replaced with LocalDate from threetenbp") public final class Date extends Object implements Comparable<Date>, Serializable
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Date other) |
boolean |
equals(Object o) |
static Date |
fromJavaUtilDate(Date date)
Convert a Java Util Date to a Google Date.
|
static Date |
fromYearMonthDay(int year,
int month,
int dayOfMonth)
Constructs a new Date instance.
|
int |
getDayOfMonth()
Returns day of month between 1 and 31 inclusive.
|
int |
getMonth()
Returns the month between 1 and 12 inclusive.
|
int |
getYear()
Returns the year.
|
int |
hashCode() |
static Date |
parseDate(String date) |
static Date |
toJavaUtilDate(Date date)
Convert a Google Date to a Java Util Date.
|
String |
toString() |
public static Date fromYearMonthDay(int year, int month, int dayOfMonth)
year
- must be greater than 0month
- must be between [1,12]dayOfMonth
- must be between [1,31]public static Date parseDate(String date)
date
- Data in RFC 3339 date format (yyyy-mm-dd).public static Date toJavaUtilDate(Date date)
date
- the date of the Google Date.public static Date fromJavaUtilDate(Date date)
date
- the date of the java.util.Datepublic int getYear()
public int getMonth()
public int getDayOfMonth()
public int compareTo(Date other)
compareTo
in interface Comparable<Date>
Copyright © 2019 Google LLC. All rights reserved.