cwohlman/node-icalendar — pull request #4 by cwohlman (2014-05-14 20:28:25+00:00)
Title: Update types.js to support using an absolute date for DURATION types

Compare this fix with the alternate fix I implemented (72ffd5edbb34634880b11571a7a17250f934fad4) and discuss which is better.

Original Commit Message:

From page 74 of RFC 5545 (http://tools.ietf.org/html/rfc5545#page-74):

The "TRIGGER" property specifies when the alarm will be triggered.
The "TRIGGER" property specifies a duration prior to the start of
an event or a to-do. The "TRIGGER" edge may be explicitly set to
be relative to the "START" or "END" of the event or to-do with the
"RELATED" parameter of the "TRIGGER" property. The "TRIGGER"
property value type can alternatively be set to an absolute
calendar date with UTC time.

Was trying to get Google to accept my ICS files with the trigger set and realized they do absolute time but the node-icalendar package doesn't. Small change to check if the DURATION was set to a Date object, and if so just reuse the existing DATE-TIME format.