Skip to content

Date.parse() seems to mix up day and month #183

Description

@GoogleCodeExporter
The Date.parse() function mixes up my days and month. My date fields are 
formatted like "dd.mm.yyyy", so that 01.04.2014 means "first of April, 2014". 
The parse() function, however, makes "January 4th, 2014", out of it. Do I have 
a chance to correct that?


What steps will reproduce the problem?

I have a PDF document with several form fields, one of them a "begin_date" 
field into which the user needs to enter a begin date.

For example, the user enters "01.10.2014" as the first of October, 2014. In 
order to get this date for further calculations, I use:

var begin = Date.parse(this.getField('begin_date').value);

and the result is January 10, 2014 (month and day switched).

(I need to add 24 months afterwards, like "Date.begin.addMonths(24)".

What is the expected output? What do you see instead?

I'd of course like to see the correct result "first of October, 2014".

What version of the product are you using? On what operating system?

I downloaded the latest version yesterday. I'm working on WIN 7 with Acrobat 
Pro XI.

Thanks!
Rudi

Original issue reported on code.google.com by rwarttm...@googlemail.com on 12 Jan 2014 at 2:39

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions