<cfsetting enablecfoutputonly=true><cfprocessingdirective pageencoding="utf-8"><cfset title = 'CFEvents Dairy' /><cfmodule template="../../tags/podlayout.cfm" title="#title#"><cfoutput> <cfhttp URL="http://www.google.com/calendar/ical/[email protected]/public/basic" method="get"> <cfset data = cfhttp.filecontent /> <cfset ical = createObject("component","ical").init(data)> <cfset results = ical.getEvents()> Timezone Converter
<cfloop index="x" from="1" to="#arraylen(results)#"> <cfset eventData = results[x]> <cfset startDate = ical.icalParseDateTime(eventData.dtstart.data)> <cfif structKeyExists(eventData,"dtend")> <cfset endDate = ical.icalParseDateTime(eventData.dtend.data)> <cfelseif structKeyExists(eventData,"duration") and eventData.duration.data is not "P1D"> <cfset endDate = ical.icalParseDuration(eventData.duration.data,startdate)> <cfelse> <cfset enddate = startdate> </cfif> #dateFormat(startDate,"dd-mmm-yy")# #timeFormat(startDate,'HH:MM')#<cfif dateFormat(startDate,"mm/dd/yy") neq dateFormat(endDate,"mm/dd/yy")> - #dateFormat(endDate,"mm/dd/yy")#</cfif> GMT #eventData.summary.data#
<cfif structKeyExists(eventData,"location")> Where: click here</cfif> </cfloop> Learn more CFEvents</cfoutput>
I've made available below the code to my CF Meeting Calendar Pod. Its very rough and uses inline CSS. It also uses uses Ray Camdens iCal CFC which you can get from his "My Tools" pod. You will need to put this in your /includes/pod/ folder along with the pod code.
Leave a note.