It means that I need a var for the year which should increment when month is 12 and of course, the one for month. So I need some sort of looping mechanism with these two variables.
Then I need to extract the name of the month based on the month counter.
Depending on what you need to do with the calendar, you may get a few things "for free" by having a look at the Calendar Helper I have on GitHub... You definitely want to make sure that you calculate using real date functions (i.e. not "just" adding 30 days, etc.) if you're at any point going to do stuff on the actual dates.
Calendar function
Hi,
I have to make a calendar that starts with the current month and shows next 12 (so may 2014 - april 2015).
It has to, of course, be dynamic.
Do you have any suggestions as to how I can do this with XSLT?
Kind regards,
Iulia
I would kinda do the magic with ordinary number calculation.
Makes sence?
Hi Mads,
Thanks for your input! I was thinking that maybe there are some functions out there I didn't know about which would or could make my life easier o:3.
That's similar to what I had myself.
But it's more like it starts with current so:
05-2014,06-2014,07-2014,08-2014,09-2014,10-2014,11-2014,12-2014, (CHANGE) 01-2015,02-2015,03-2015... (12 months)
It means that I need a var for the year which should increment when month is 12 and of course, the one for month. So I need some sort of looping mechanism with these two variables.
Then I need to extract the name of the month based on the month counter.
Roughly.. Hoped there was an easier way though..
/Iulia
Hi Iulia,
Depending on what you need to do with the calendar, you may get a few things "for free" by having a look at the Calendar Helper I have on GitHub... You definitely want to make sure that you calculate using real date functions (i.e. not "just" adding 30 days, etc.) if you're at any point going to do stuff on the actual dates.
/Chriztian
As Chriztian says... Have a look at the Calendar Helper! It sorta rocks.
Otherwise you could do all your math in a classic for.loop hack!
The last if statement sorta is where you should do your magic. Pass any variable into the forloop you'd want!
Awesome! Thanks guys! If I could, I would set you both for "solved" :)
is working on a reply...