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

unexpected results for diff #8

Open
taf2 opened this issue Sep 11, 2014 · 0 comments
Open

unexpected results for diff #8

taf2 opened this issue Sep 11, 2014 · 0 comments

Comments

@taf2
Copy link

taf2 commented Sep 11, 2014

macpro.local: (development) 0> s = DateTime.parse("Monday, August 11, 2014")
=> Mon, 11 Aug 2014 00:00:00 +0000
macpro.local: (development) 0> e = DateTime.parse("Thursday, September 11, 2014")
=> Thu, 11 Sep 2014 00:00:00 +0000
macpro.local: (development) 0> Time.diff(e, s)
=> {:year=>0, :month=>1, :week=>0, :day=>1, :hour=>0, :minute=>0, :second=>0, :diff=>"1 month, 1 day and 00:00:00"}

I would have expected :week to be 4 or 5 in the above example. Also :hour and :minute, :day to be populated with larger values...

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