Date and Time Formats
Date or date with time can be used in DTSTART, UNTIL, EXDATE and RDATE elements when specifying a recurrence pattern.
iCalendar defines the DATE value type to identify values that contains a calendar date and also defines the DATE-TIME type to identify values that specify a precise calendar date and time of day.
DATE-TIME values can be specified in three forms:
- With local time
- With UTC time
- With local time and time zone
DATE
According to the iCalendar standard, DATE values must follow the yyyyMMdd format.
The following example represents July 14, 1997:
19970714
DATE-TIME With Local Time
The date with local time form is simply a date-time value that does not contain the UTC designator nor does it reference a time zone. For example, the following represents Janurary 18, 1998, at 11 PM:
DTSTART:19980118T230000
Date-time values of this type are said to be "floating" and are not bound to any time zone in particular. They are used to represent the same hour, minute, and second value regardless of which time zone is currently being observed.
DATE-TIME With UTC Time
The date with UTC time, or absolute time, is identified by a LATIN CAPITAL LETTER Z suffix character, the UTC designator, appended to the time value. For example, the following represents January 19, 1998, at 0700 UTC:
DTSTART:19980119T070000Z
NotePlease note that Aspose.iCalendar at the moment ignores the UTC format “Z” suffix and treats the time as local time. NoteThe RFC2445 standard states that if a time portion is specified in the UNTIL rule of a recurrence pattern, it must be in UTC format. This is a very strange statement, and in fact, there are examples in the standard that are calculated incorrectly. Aspose.iCalendar accepts time in any format in the UNTIL rule.
DATE-TIME With Local Time and Time Zone
The date and local time with reference to time zone information is identified by the use the TZID property parameter to reference the appropriate time zone definition. For example, the following represents 2 AM in New York on Janurary 19, 1998:
DTSTART;TZID=US-Eastern:19980119T020000
Note: Please note that Aspose.iCalendar at the moment ignores the TZID parameter and treats the time as a local time.
BYWEEKNO Option Provides ISO 8601 Compliance
Use BYWEEKNO only when conformance with ISO 8601 is required. Week numbers as defined by ISO 8601 are very different from week numbers in “common” sense. According to ISO 8601, week number one of the calendar year is the first week of a calendar year that contains at least four days. This rule makes the algorithm specific to applications requiring conformance to ISO 8601 and make it almost inapplicable to other “normal” uses.
ISO 8601 is supported by some European banking and financial applications. It is also used in Television for booking commercials. An ISO week calculator can be found at http://www.personal.ecu.edu/mccartyr/isowdcal.html
The BYWEEKNO rule specifies a comma-delimited list of numbers identifying weeks of the year. Valid values are 1 to 53 and 1 to 53. This corresponds to weeks according to week numbering as defined in ISO 8601.
BYWEEKNO is only valid for YEARLY rules.
To illustrate, the following are two very different recurrence patterns:
Friday of 1st ISO 8601 week of the year
FREQ=YEARLY;BYWEEKNO=1;BYDAY=FR
1st Friday of the year
FREQ=YEARLY;BYDAY=1FR
In 1999, for example, 1st Friday of the year is 1999/01/01, while Friday of the 1st ISO 8601 week is 1999/01/08.