Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid string parses but results in unexpected date #91

Closed
pgp44 opened this issue Aug 31, 2020 · 1 comment
Closed

Invalid string parses but results in unexpected date #91

pgp44 opened this issue Aug 31, 2020 · 1 comment

Comments

@pgp44
Copy link

pgp44 commented Aug 31, 2020

Version 3.0.0

import * as tf from 'd3-time-format';
console.log(tf.timeParse("%m/%d/%y")("66/8/20"));

==>

2025-06-07T22:00:00.000Z
Would rather expect null.

What am I missing?

Tx!

Peter

@Fil
Copy link
Member

Fil commented Aug 31, 2020

Duplicate of #47

d3-time-parse does not validate the strings. You might want to test format(parse(x))===x ?

@Fil Fil closed this as completed Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants