properly handle all-day events

This commit is contained in:
Tyler Renelle 2013-02-15 13:38:04 -05:00
parent a5fcfe7a02
commit 04c032deeb

View file

@ -29,8 +29,9 @@ module.exports = (expressApp, root, derby) ->
_.each tasksWithDates, (task) ->
event = new icalendar.VEvent(task.id);
event.setSummary(task.text);
# event.setDate new Date(task.date), 60 * 60 # Duration in seconds
event.setDate new Date(task.date)
d = new Date(task.date)
d.date_only = true
event.setDate d
ical.addComponent event
res.type('ics')
res.send(200, ical.toString())