4 Replies Latest reply on Jun 6, 2010 2:07 PM by ChungLee01

    PDF Acroform Javascript (WIN): Is Current/Date Time between WED 10:56p - WED 11:59p

    ChungLee01

      Greetings All;

       

      I'm trying to determine if the current date/time is between WED 10:56p - WED 11:59p.

      Here's my script but it doesn't work.

      var now = new Date( );
      var hour = now.getHours( );
      var day = now.getDay( );
      var minute = now.getMinutes( );
      if (day = 4 && hour = 22 && minute >= 56 ||day = 4 && hour = 23 && minute <= 59) {
      event.value = "Yes";
      }
      else {
      event.value = "No";
      }

       

      What am I missing/doing wrong?

       

      Please advise (and Thank You in advance for assistance).