I have a website using this JS code:
http://www.codehandling.com/2013/05/myevents-your-google-calendar-events.html
Here is the homepage of my website: http://emeraldislebarandgrill.com/
You will see the first box says Feb 28th and then says Monday Specials, when I display the GMT date it is the correct date but its the label that is not displaying correctly, I believe it has to do with the fact that its Leap year this year, but how do I adjust the JS code to account for a leap year.
Here is a function that I believe needs to be adjusted in the gcal-events.js file (http://emeraldislebarandgrill.com/js/gcal-events.js):
function getDateLowerLimit() {
var todayDate;
if (dateLowerlimit == "") {
todayDate = new Date();
dateLowerlimit = todayDate.getFullYear() + "-" + (todayDate.getMonth() + 1) + "-" + (todayDate.getDate() < 10 ? '0' : '') + todayDate.getDate() + "T00:00:00+00:00";
} else {
todayDate = new Date(dateLowerlimit)
}
}
So it seemed that the easiest route at this point, was to just add 1 to the getDate variable when it was getting outputting.
(dd.getDate()+1)
If anyone knows the correct way to detect a leap year in the gcal-events.js I would love to do this correctly instead of this hack because next year I will have to update it again and then again in 4 years.