Skip to content

Wrong date using Date.defineParser #1197

@MarcosFernandes

Description

@MarcosFernandes

Hi,

Date is not being correcty formatted using dd/mm/YYY. Here's how to reproduce:
Date.defineParser("%d/%m/%Y");
console.log( Date.parse("02/04/2010") )

The output will be wrong:
Thu Feb 04 2010 00:00:00 GMT-0200 (BRST)

Note that if the day is above 12 the date is correctly parsed. IE:
console.log( Date.parse("28/03/2010") )

This is correctly parsed:
Sun Mar 28 2010 00:00:00 GMT-0300 (BRT)

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions