public class Date extends Object implements Comparable<Date>
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Return a copy of this object.
|
int |
compareTo(Date o) |
boolean |
equals(Object other) |
int |
getDay() |
int |
getDayOfWeek() |
int |
getMonth() |
int |
getYear() |
int |
hashCode() |
int |
lengthOfMonth() |
static Date |
of(int year,
int month,
int dayOfMonth) |
static Date |
ofEpochDay(int epochDay) |
static Date |
ofEpochMilli(long epochMilli) |
void |
setDayOfMonth(int dayOfMonth) |
void |
setMonth(int month) |
void |
setTimeInDays(int epochDay) |
void |
setTimeInMillis(long epochMilli) |
void |
setYear(int year) |
int |
toEpochDay() |
long |
toEpochMilli() |
long |
toEpochSecond() |
String |
toString() |
static Date |
valueOf(String s) |
public Date()
public Date(Date d)
public int compareTo(Date o)
compareTo
in interface Comparable<Date>
public int toEpochDay()
public long toEpochSecond()
public long toEpochMilli()
public void setYear(int year)
public void setMonth(int month)
public void setDayOfMonth(int dayOfMonth)
public void setTimeInDays(int epochDay)
public void setTimeInMillis(long epochMilli)
public static Date ofEpochDay(int epochDay)
public static Date ofEpochMilli(long epochMilli)
public static Date of(int year, int month, int dayOfMonth)
public int getYear()
public int getMonth()
public int getDay()
public int lengthOfMonth()
public int getDayOfWeek()
Copyright © 2022 The Apache Software Foundation. All rights reserved.