can someone tell me, how can I create a list of dates using xslt using a start- and end date and a parameter for the calculation period, so sth like the input
<root>
<startdate>2014/01/01</startdate>
<enddate>2015/02/20</enddate>
<period>daily</period>
</root>
gives me a list
<root>
<date>2014/01/01</date>
<date>2014/01/02</date>
...
<date>2014/02/20</date>
</root>
My node period
can have values in
daily
weekly
fortnightly
monthly
So the last 3 would give me lists like
<root>
<date>2014/01/01</date>
<date>2014/01/08</date>
...
<date>2015/02/18</date>
</root>
<root>
<date>2014/01/01</date>
<date>2014/01/15</date>
...
<date>2015/02/11</date>
</root>
<root>
<date>2014/01/01</date>
<date>2014/02/01</date>
...
<date>2015/02/01</date>
</root>
with the last date smaller or equal the enddate. The date formats I would use are YYYYMMDD
and DD/MM/YYYY
, but I would probably be able to adapt any other date format.
Someone knows how to do this?
Thanks very much!