javascript - Is there a possible way to write current month and year in timeline script? -


i have timeline script, , want, script work current month.

var timeline = new timeline("timeline", new date("mar 2013")); 

i need replace "mar 2013" "mar 2014", dont want write hand. mean, in future, script should automaticaly current year , month. possible?

thanks of answers!

"is possible?"

of course.

using new date() without arguments gets date object (full) current date, so:

var timeline = new timeline("timeline", new date()); 

or if want midnight on first day of current month:

var = new date(); var timeline = new timeline("timeline", new date(now.getfullyear(), now.getmonth())); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -