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

Leading zeroes ignored in parsing of milliseconds #49

Closed
dvorakroth opened this issue Jan 25, 2024 · 2 comments
Closed

Leading zeroes ignored in parsing of milliseconds #49

dvorakroth opened this issue Jan 25, 2024 · 2 comments

Comments

@dvorakroth
Copy link
Contributor

The Problem

When parsing a time that includes an amount of milliseconds under 100, the parse function erroneously ignores the leading zeroes.

Steps to reproduce

const PostgresInterval = require('postgres-interval');

console.log(PostgresInterval('04:20:00.069').milliseconds); // should print 69, instead prints 690
@charmander
Copy link
Contributor

i am not surprised this was hiding in #48

@bendrucker
Copy link
Owner

Haven't had a chance to fix this yet but happy to review a fix ASAP from anyone who wants to contribute one.

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

3 participants