tritech/node-icalendar — pull request #9 by fomojola (2013-06-16 05:31:41+00:00)
Title: Added handling of Date instances to the DURATION: allows absolute time settings of TRIGGER

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.