1 Reply Latest reply on Jun 17, 2013 5:31 AM by mrfale67

    new Date() --> getYear() & getMonth() return strange/wrong values

    mrfale67 Level 2


      I am writing this Javascript under a text field initialize event of Livecycle:

      var date = new Date();

      xfa.host.messageBox("year "+date.getYear(),"Message",3);

      xfa.host.messageBox("month "+date.getMonth(),"Message",3);


      I get "113" for the first messageBox and "5" for the second.

      Shouldn't they be 13 (or 2013) and 6 as we are in June 2013 now??