I have followin code:
var d=new Date();
var curYear=d.getFullYear();
var curMon=d.getMonth();
var curDate=d.getDate();
app.alert ("cYear" + curYear + "cMonth" + curMon + "cDate" + curDate);
What I got on the message window is:
cYear2009cMonth3cDate27.
But today is 2009/4/27. I am suppose to get
cYear2009cMonth4cDate27.
Why the month is not correct?
Thanks!
That's because in Acrobat JavaScript the months start at zero. This is explained the series of tutorials on Dates and Times in the Learning Center here at AUC-
http://www.acrobatusers.com/tutorials/2006/date_time_part1
Hope this helps,
Dimitri
WindJack Solutions
www.windjack.com
www.pdfscripting.com
Dimitri Munkirs
WindJack Solutions
pdfscripting.com