-
Notifications
You must be signed in to change notification settings - Fork 184
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
implicit 0's behaviour-change #90
Comments
good find! |
fixed in yeah, I don't mind the idea of using implicit values from the current time - Those are the same assumptions made in js date object. But if this generates race-conditions, like your example, we should avoid those, at least. I've co-erced millisecond, and second to 0, unless they're specified. It's possible that if you run this on the last millisecond before a minute changes, it'll happen again. ¯_(ツ)_/¯ |
Thanks for the fix @spencermountain but I'm afraid js date doesn't make that assumptions.
except there is no arguments passed in, feels it might be nicer to have the same behaviour as js date object, I could make those changes if you like. |
oh hey, good point! |
isBefore
return value when missing milliseconds in the dateFix for #90 and also the dst awareness add function
spacetime('2019-01-25T20:00:00+01:00').isBefore('2019-01-25T20:00:00+01:00')
returnstrue
, but clearly is the same date. Prob is, when milliseconds are not specified, the parser doesn't assume 0, but a random (prob taken from current date) value.The text was updated successfully, but these errors were encountered: