Javascript Month Trend Calculation Using Date
hello,
i have search forum, i'm not able identify answers script question.
i using adobe acrobat 9 , i'm javascript novice , intermediate form builder.
i create custom calculation script using information stored in field. field text field formatted date "mm/dd/yyyy"
i'm trying create monthly straight line trend.
example:
user input date: 01/10/2014 (month/day/year); cannot driven current system date, must user entered
units date: 10 units
monthly straight line trend 31 units (this calculate)
formula = (units/day)*max days of month
to accomplish goal, need solve following hangups:
1) can extract "day" date text field?
2) can derive "max" number of days in given month/year?
3) can tie script don't need have "day" text field , "max day" text field?
any appreciated.
1) yes, if convert date string js date object can use date method getdate() day of month date object.
2) yes, there many ways compute value.
3} js supports variables may come down programing skillls.
More discussions in JavaScript
adobe
Comments
Post a Comment