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

README incorrectly defines msecs #248

Closed
rmm5t opened this issue Jan 2, 2018 · 0 comments
Closed

README incorrectly defines msecs #248

rmm5t opened this issue Jan 2, 2018 · 0 comments

Comments

@rmm5t
Copy link

rmm5t commented Jan 2, 2018

The README docs for the v1() options states:

msecs - (Number | Date) Time in milliseconds since unix Epoch. Default: The current time is used.

But Date instances do not work as expected. Only millisecond values do:

> uuid.v1({ msecs: new Date() })
'00000000-0000-1000-b5d5-0d7fa4a8285e'

> uuid.v1({ msecs: new Date().getTime() })
'3a7ea410-effa-11e7-b5d5-0d7fa4a8285e'

I'm happy to submit a PR to fix this, but is this something where you would like the README to be corrected, or would you like the v1() implementation to accept Date instances for the msecs option?

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

No branches or pull requests

1 participant