/ Published in: Groovy
Thanx to Guillaume Laforge, who provided this code snippet of Groovy code in a GSP. The snippet below is more or less the same, less the HTML. It will show all future evens and create a eventMap for each event.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
import net.fortuna.ical4j.util.Calendars import net.fortuna.ical4j.model.component.VEvent import java.text.SimpleDateFormat log.debug("Total components in iCal file: ${cal.components.size()}" ) { { log.warn("Found event of class ${it.getClass()}, skipping!") } startDate : startDate, startTime : startTime, location : (it.location.value) ? it.location.value : 'No Location', summary : it.summary.value, description : it.description.value ] dates << eventMap