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

diffDays = 0.9583333333333334 between 2 timezones #26

Open
andreimc opened this issue Jan 20, 2014 · 1 comment
Open

diffDays = 0.9583333333333334 between 2 timezones #26

andreimc opened this issue Jan 20, 2014 · 1 comment

Comments

@andreimc
Copy link

x = new XDate('Sun Jun 29 2014 00:00:00 GMT+1000 (EST)')
y = new XDate("Mon Jun 30 2014 00:00:00 GMT+1100 (EST)")

x.diffDays(y)

result is 0.9583333333333334

should be 1 maybe ? basically if the time changes tomorrow you get the wrong value

@andreimc
Copy link
Author

hour changes are gonna cause it

a = new Date('Apr 20 2014 15:43:48')
Sun Apr 20 2014 15:43:48 GMT+1000 (EST)
b = new Date()
Mon Jan 20 2014 15:44:26 GMT+1100 (EST)
x = new XDate(a)
[Sun Apr 20 2014 15:43:48 GMT+1000 (EST)]
y = new XDate(b)
[Mon Jan 20 2014 15:44:26 GMT+1100 (EST)]
x.diffDays(y)

will result in -89.9995491087963

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