Skip to content

Problem with dates in YYYY-MM-DD format #167

@phila42

Description

@phila42

The function _parseDate has a problem with dates in the format YYYY-MM-DD - try parsing 2012-09-26, for example.

What happens is that parseInt('09') gets called for the month - Javascript treats this as an invalid OCTAL number and returns 0!

The fix is to call parseInt with an explicit radix, e.g. parseInt('09', 10) - this returns 9, as expected.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions