public class Date extends Object implements Comparable
Constructor and Description |
---|
Date()
Constructs a new Date object, initialized with the current date.
|
Date(Calendar cal) |
Date(Date d) |
Date(int daysSince1970)
Deprecated.
|
Date(int year,
int month,
int dayOfMonth) |
Date(ObjectInputStream in)
Creates a new instance from a stream.
|
Date(RandomAccessFile in)
Creates a new instance from a RandomAccessFile.
|
Modifier and Type | Method and Description |
---|---|
Date |
addDays(int days) |
int |
compareTo(Object obj) |
static Date |
createDateFromValue(long value) |
static Date |
createDDMMYYYY(String date,
String separator) |
static Date |
createYYMMDD(String date,
String separator) |
static Date |
createYYYYMMDD(String date,
String separator) |
boolean |
equals(Object obj) |
Calendar |
getCalendar() |
static Date |
getCurrentDate() |
String |
getDateString() |
int |
getDayOfMonth() |
int |
getDaysSince1970()
Deprecated.
|
String |
getLongDateString() |
int |
getMonth() |
int |
getNumberOfDaysSince(Date d) |
long |
getValue() |
int |
getYear() |
int |
hashCode()
A hash code implementation that returns the same code for equal Dates.
|
String |
toString() |
void |
writeData(ObjectOutputStream out)
Writes this instance to a stream.
|
void |
writeToDataFile(RandomAccessFile out)
Writes this instance to a RandomAccessFile.
|
public Date()
public Date(int year, int month, int dayOfMonth)
public Date(int daysSince1970)
public Date(Calendar cal)
public Date(Date d)
public Date(RandomAccessFile in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Date(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public int getNumberOfDaysSince(Date d)
public int getYear()
public int getMonth()
public int getDayOfMonth()
public static Date getCurrentDate()
public void writeToDataFile(RandomAccessFile out) throws IOException
out
- IOException
public void writeData(ObjectOutputStream out) throws IOException
IOException
public int hashCode()
public String getDateString()
public String getLongDateString()
public long getValue()
public static Date createDateFromValue(long value)
public Calendar getCalendar()
public int getDaysSince1970()
public Date addDays(int days)
public int compareTo(Object obj)
compareTo
in interface Comparable
TV-Browser 2.2.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)