Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

parser should accept only instances of LocalDate and reject JS Dates #10

Closed
FrancescoCioria opened this issue Jan 5, 2017 · 0 comments
Assignees

Comments

@FrancescoCioria
Copy link
Contributor

requirements

parser should accept only instances of LocalDate and reject JS Dates because we want to be sure that users are aware that passing as ISO date to LocalDate gives a different result than passing it to a Date.

Nevertheless, we should keep accepting instances of LocalDate so to give a way to easily clone a LocalDate

specs

parser should accept only undefined, instances of LocalDate and ISO dates:

  • add if (typeof value === 'undefined') to handle first case
  • replace instanceof Date with instanceof LocalDate
  • ISO dates should be already fine

misc

{optional: other useful info}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants