Link to home
Start Free TrialLog in
Avatar of DMackallii
DMackallii

asked on

How to calculate next Friday's date in Acroform Javascript?

Acrobat Pro v8.12
Acroforms/ WIN

Greetings All;

How can I calculate next Friday's date in Acroform Javascript?

These formulas calculate next Friday's date in VBA and/or Excel:


Where $C$4 = today's date

     VBA Version                                     Excel version
=DATE-WEEKDAY(DATE, 2)+12      =$C$4-WEEKDAY($C$4, 2)+12

This formula will calculate today's date in Acroform Javascript
for the Text2 textfield:


var d = new Date();
var sDate = util.printd("mm/dd/yyyy", d);
this.getField("Text2").value = sDate;


How can I modify it to calculate next Friday's date in Acroform Javascript?

Thanks, in advance, for your time and consideration.
´*•.¸(`*•.¸?¸.•*´)¸.•*´
?*°Doris 42DoubleDDs*°•´»?
.¸.•*(¸.•*´?`*•.¸) *•.¸


ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DMackallii
DMackallii

ASKER

03/27/11

leakim971.....

That has to be a record! (Both in the simplicity of your solution and the promptness of your response.

Thank you soooo much!
´*•.¸(`*•.¸?¸.•*´)¸.•*´
?*°Doris 42DoubleDDs*°•´»?
.¸.•*(¸.•*´?`*•.¸) *•.¸