2 Replies Latest reply on Jun 6, 2010 12:41 PM by ChungLee01

    PDF Acroform Javascript (WIN): Calculate Next Tuesday Date

    ChungLee01

      06/03/10

       

      Greetings;

       

      I found a javascript that will calculate next Tuesday's date, but I can't seem to get it to work in Acrobat Pro v8 (Acroforms).

       

      Any assistance/guidance you can provide is most appreciated.

       

       

      Script:

       

      http://christian.lassem.com/js/javascript-next-tuesday/

       

      Javascript for finding Next Tuesday?

       


      function find_date_of_next_tuesday(){
         var today=new Date();
         today.setDate(today.getDate()+1);
         while (today.getDay()!=2){
            today.setDate(today.getDate()+1);
         }
         return (today.toDateString());
      }

       

      Thanks in advance.