I am totally new to javascript and I have a very easy to answer question: How do I use a current year string?
Should I look like this?
var currentyear = now.getYear();
And then I want to use that string in the following code snippet (The string should always replace the 2011)
drawDayEvents('2011-12-27', '#day1');
drawDayEvents('2011-12-28', '#day2');
drawDayEvents('2011-12-29', '#day3');
drawDayEvents('2011-12-30', '#day4');
...
var start = new Date(2011, 12-1, 27);
var end = new Date(2011, 12-1, 31);
if((time < start) || (time > end)) {
time.setYear(2011);
Does it has to be like this?
var currentyear = now.getYear();
drawDayEvents('$currentyear-12-27', '#day1');
drawDayEvents('$currentyear-12-28', '#day2');
drawDayEvents('$currentyear-12-29', '#day3');
drawDayEvents('$currentyear-12-30', '#day4');
...
var start = new Date($currentyear, 12-1, 27);
var end = new Date($currentyear, 12-1, 31);
if((time < start) || (time > end)) {
time.setYear($currentyear);