Top Description Fields Constructors Methods
net.fortuna.ical4j.model

public abstract Class Iso8601

extends Date
Class Inheritance
Known Direct Subclasses
net.fortuna.ical4j.model.Date, net.fortuna.ical4j.model.Time
Annotations
@Deprecated
Imports
net.fortuna.ical4j.util.CompatibilityHints, .Dates, .TimeZones, java.text.DateFormat, java.util.Date

Deprecated

Replaced with new Java Date/Time API implementation

$Id$ Created on 30/06/2005 Base class for date and time representations as defined by the ISO 8601 standard. Sub-classes must ensure that either the correct precision is used in constructor arguments, or that Object.equals() is overridden to ensure equality checking is consistent with the type.
Author
Ben Fortuna

Field Summary

Modifier and TypeField and Description
private final DateFormat
private static final TimeZone
private DateFormat
private final int
private static final long

Constructor Summary

AccessConstructor and Description
public
Iso8601(final long
a time value in milliseconds
time
,
final String
the formatting pattern to apply
pattern
,
final int
the precision to apply
precision
,
TimeZone
the timezone for the instance
tz
)

public
Iso8601(final String
the formatting pattern to apply
pattern
,
final int
the precision to apply
precision
,
TimeZone
the timezone for the instance
tz
)

public
Iso8601(final Date
a time value as a date
time
,
final String
the formatting pattern to apply
pattern
,
final int
the precision to apply
precision
,
TimeZone
the timezone for the instance
tz
)

Method Summary

Modifier and TypeMethod and Description
protected final DateFormat

Returns:

Returns the format.
getFormat
()

public void
setTime(final long
the number of milliseconds.
time
)

Overrides java.util.Date.setTime.

Sets this Date object to represent a point in time that is time milliseconds after January 1, 1970 00:00:00 GMT.

public String
toString()

Overrides java.util.Date.toString.

Converts this Date object to a String of the form:

dow mon dd hh:mm:ss zzz yyyy
Inherited from java.util.Date:
afterbeforeclonecompareToequalsfromgetDategetDaygetHoursgetMinutesgetMonthgetSecondsgetTimegetTimezoneOffsetgetYearhashCodeparsesetDatesetHourssetMinutessetMonthsetSecondssetYeartoGMTStringtoInstanttoLocaleStringUTC

Field Detail

formatback to summary
private final DateFormat format
GMTback to summary
private static final TimeZone GMT
gmtFormatback to summary
private DateFormat gmtFormat
precisionback to summary
private final int precision
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.util.Date.serialVersionUID.

Constructor Detail

Iso8601back to summary
public Iso8601(final long time, final String pattern, final int precision, TimeZone tz)
Parameters
time:long

a time value in milliseconds

pattern:String

the formatting pattern to apply

precision:int

the precision to apply

tz:TimeZone

the timezone for the instance

See Also
Dates#PRECISION_DAY, Dates#PRECISION_SECOND
Iso8601back to summary
public Iso8601(final String pattern, final int precision, TimeZone tz)
Parameters
pattern:String

the formatting pattern to apply

precision:int

the precision to apply

tz:TimeZone

the timezone for the instance

See Also
Dates#PRECISION_DAY, Dates#PRECISION_SECOND
Iso8601back to summary
public Iso8601(final Date time, final String pattern, final int precision, TimeZone tz)
Parameters
time:Date

a time value as a date

pattern:String

the formatting pattern to apply

precision:int

the precision to apply

tz:TimeZone

the timezone for the instance

See Also
Dates#PRECISION_DAY, Dates#PRECISION_SECOND

Method Detail

getFormatback to summary
protected final DateFormat getFormat()
Returns:DateFormat

Returns the format.

setTimeback to summary
public void setTime(final long time)

Overrides java.util.Date.setTime.

Doc from java.util.Date.setTime.

Sets this Date object to represent a point in time that is time milliseconds after January 1, 1970 00:00:00 GMT.

Parameters
time:long

the number of milliseconds.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.util.Date.toString.

Doc from java.util.Date.toString.

Converts this Date object to a String of the form:

dow mon dd hh:mm:ss zzz yyyy
where:
  • dow is the day of the week (Sun, Mon, Tue, Wed, Thu, Fri, Sat).
  • mon is the month (Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec).
  • dd is the day of the month (01 through 31), as two decimal digits.
  • hh is the hour of the day (00 through 23), as two decimal digits.
  • mm is the minute within the hour (00 through 59), as two decimal digits.
  • ss is the second within the minute (00 through 61), as two decimal digits.
  • zzz is the time zone (and may reflect daylight saving time). Standard time zone abbreviations include those recognized by the method parse. If time zone information is not available, then zzz is empty - that is, it consists of no characters at all.
  • yyyy is the year, as four decimal digits.
Returns:String

a string representation of this date.

Annotations
@Override