net.fortuna.ical4j.model
Class Date

java.lang.Object
  extended by java.util.Date
      extended by net.fortuna.ical4j.model.Iso8601
          extended by net.fortuna.ical4j.model.Date
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Date>
Direct Known Subclasses:
DateTime

public class Date
extends Iso8601

$Id$ Created on 26/06/2005 Base class for all representations of time values in RFC2445.

 4.3.4 Date
 
    Value Name: DATE
 
    Purpose: This value type is used to identify values that contain a
    calendar date.
 
    Formal Definition: The value type is defined by the following
    notation:
 
      date               = date-value
 
      date-value         = date-fullyear date-month date-mday
      date-fullyear      = 4DIGIT
      date-month         = 2DIGIT        ;01-12
      date-mday          = 2DIGIT        ;01-28, 01-29, 01-30, 01-31
                                         ;based on month/year
 
    Description: If the property permits, multiple "date" values are
    specified as a COMMA character (US-ASCII decimal 44) separated list
    of values. The format for the value type is expressed as the [ISO
    8601] complete representation, basic format for a calendar date. The
    textual format specifies a four-digit year, two-digit month, and
    two-digit day of the month. There are no separator characters between
    the year, month and day component text.
 
    No additional content value encoding (i.e., BACKSLASH character
    encoding) is defined for this value type.
 
    Example: The following represents July 14, 1997:
 
      19970714
 
 

Author:
Ben Fortuna
See Also:
Serialized Form

Constructor Summary
  Date()
          Default constructor.
  Date(Date date)
           
protected Date(int precision, TimeZone tz)
          Creates a new date instance with the specified precision.
  Date(long time)
           
protected Date(long time, int precision, TimeZone tz)
          Creates a new date instance with the specified precision.
  Date(String value)
           
  Date(String value, String pattern)
           
 
Method Summary
 
Methods inherited from class net.fortuna.ical4j.model.Iso8601
getFormat, setTime, toString
 
Methods inherited from class java.util.Date
after, before, clone, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setYear, toGMTString, toLocaleString, UTC
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Date

public Date()
Default constructor.


Date

protected Date(int precision,
               TimeZone tz)
Creates a new date instance with the specified precision. This constructor is only intended for use by sub-classes.

Parameters:
precision - the date precision
tz - the timezone
See Also:
Dates.PRECISION_DAY, Dates.PRECISION_SECOND

Date

public Date(long time)
Parameters:
time - a date value in milliseconds

Date

protected Date(long time,
               int precision,
               TimeZone tz)
Creates a new date instance with the specified precision. This constructor is only intended for use by sub-classes.

Parameters:
time - a date value in milliseconds
precision - the date precision
tz - the timezone
See Also:
Dates.PRECISION_DAY, Dates.PRECISION_SECOND

Date

public Date(Date date)
Parameters:
date - a date value

Date

public Date(String value)
     throws ParseException
Parameters:
value - a string representation of a date
Throws:
ParseException - where the specified string is not a valid date

Date

public Date(String value,
            String pattern)
     throws ParseException
Parameters:
value - a string representation of a date
pattern - a date pattern to apply when parsing
Throws:
ParseException - where the specified string is not a valid date


Copyright © 2004-2012 Micronode. All Rights Reserved.