Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Robert J. Bullock 386 posts 405 karma points
    Feb 21, 2009 @ 18:42
    Robert J. Bullock
    0

    PDCalendar: Auto Date Range

    I came up with this XSLT to get a list of events from PDCalendar for a period of time (in this case, two months from today's date):


    ]>

    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    xmlns:pdcalendar ="urn:pdcalendar"
    xmlns:exslt="urn:Exslt.ExsltCommon"
    xmlns:date="urn:Exslt.ExsltDatesAndTimes"
    exclude-result-prefixes="msxml umbraco.library pdcalendar exslt date">











    The salient lines are:





    Note the "throughDate" param and that sort of weird date:add function... What that does is add 2 months to the $currentDate value (which is today's date). Works like a charm. I could modify it to allow you to specify the period you want I guess...

Please Sign in or register to post replies

Write your reply to:

Draft