public class Date extends Object implements Cloneable, Comparable<Date>, Serializable
Constructor and Description |
---|
Date() |
Date(int year,
int month,
int date) |
Date(int year,
int month,
int date,
int hrs,
int min) |
Date(int year,
int month,
int date,
int hrs,
int min,
int sec) |
Date(long date) |
Date(String date) |
Modifier and Type | Method and Description |
---|---|
boolean |
after(Date when) |
boolean |
before(Date when) |
Object |
clone() |
int |
compareTo(Date other) |
boolean |
equals(Object obj) |
int |
getDate() |
int |
getDay() |
int |
getHours() |
int |
getMinutes() |
int |
getMonth() |
int |
getSeconds() |
long |
getTime() |
int |
getTimezoneOffset() |
int |
getYear() |
int |
hashCode() |
protected static String |
padTwo(int number)
Ensure a number is displayed with two digits.
|
static long |
parse(String s) |
void |
setDate(int date) |
void |
setHours(int hours) |
void |
setMinutes(int minutes) |
void |
setMonth(int month) |
void |
setSeconds(int seconds) |
void |
setTime(long time) |
void |
setYear(int year) |
String |
toGMTString() |
String |
toLocaleString() |
String |
toString() |
static long |
UTC(int year,
int month,
int date,
int hrs,
int min,
int sec) |
public Date()
public Date(int year, int month, int date)
public Date(int year, int month, int date, int hrs, int min)
public Date(int year, int month, int date, int hrs, int min, int sec)
public Date(long date)
public Date(String date)
public static long parse(String s)
public static long UTC(int year, int month, int date, int hrs, int min, int sec)
protected static String padTwo(int number)
public boolean after(Date when)
public boolean before(Date when)
public Object clone()
public int compareTo(Date other)
compareTo
in interface Comparable<Date>
public int getDate()
public int getDay()
public int getHours()
public int getMinutes()
public int getMonth()
public int getSeconds()
public long getTime()
public int getTimezoneOffset()
public int getYear()
public void setDate(int date)
public void setHours(int hours)
public void setMinutes(int minutes)
public void setMonth(int month)
public void setSeconds(int seconds)
public void setTime(long time)
public void setYear(int year)
public String toGMTString()
public String toLocaleString()
Copyright © 2018. All rights reserved.