net.fortuna.ical4j.model
Class DateTime
Date
net.fortuna.ical4j.model.DateTime
public class DateTime
extends Date
$Id: DateTime.java,v 1.26 2008/12/16 12:34:52 fortuna Exp $
Created on 26/06/2005
Represents a time of day on a specific date.
DateTime() - Default constructor.
|
DateTime(String value) - Constructs a new DateTime instance from parsing the specified string representation in the default (local)
timezone.
|
DateTime(String value, TimeZone timezone) - Creates a new date-time instance from the specified value in the given timezone.
|
DateTime(boolean utc)
|
DateTime(java.util.Date date)
|
DateTime(long time)
|
boolean | equals(Object arg0) - Uses
EqualsBuilder to test equality.
|
TimeZone | getTimeZone() - Returns the current timezone associated with this date-time value.
|
int | hashCode() - Uses
HashCodeBuilder to build hashcode.
|
boolean | isUtc()
|
void | setTime(long time)
|
void | setTimeZone(TimeZone timezone) - Sets the timezone associated with this date-time instance.
|
void | setUtc(boolean utc) - Updates this date-time to display in UTC time if the argument is true.
|
String | toString()
|
DateTime
public DateTime()
Default constructor.
DateTime
public DateTime(String value)
throws ParseException
Constructs a new DateTime instance from parsing the specified string representation in the default (local)
timezone.
DateTime
public DateTime(String value,
TimeZone timezone)
throws ParseException
Creates a new date-time instance from the specified value in the given timezone. If a timezone is not specified,
the default timezone (as returned by java.util.TimeZone.getDefault()
) is used.
DateTime
public DateTime(boolean utc)
DateTime
public DateTime(java.util.Date date)
DateTime
public DateTime(long time)
equals
public boolean equals(Object arg0)
Uses EqualsBuilder
to test equality.
getTimeZone
public final TimeZone getTimeZone()
Returns the current timezone associated with this date-time value.
hashCode
public int hashCode()
Uses HashCodeBuilder
to build hashcode.
isUtc
public final boolean isUtc()
setTime
public final void setTime(long time)
setTimeZone
public final void setTimeZone(TimeZone timezone)
Sets the timezone associated with this date-time instance. If the specified timezone is null, it will reset
to the default timezone. If the date-time instance is utc, it will turn into
either a floating (no timezone) date-time, or a date-time with a timezone.
setUtc
public final void setUtc(boolean utc)
Updates this date-time to display in UTC time if the argument is true. Otherwise, resets to the default timezone.
toString
public final String toString()