We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Expecting: 50 years 10 months 11 days (18,578 days)
Actual: 619 mos 8 days (18,578 days)
The calculation for years seems to be off.
irb> require 'date' => true irb> require 'chronic_duration' => true irb> b = Date.new( 1963, 11, 27 ) => #<Date: 1963-11-27 ((2438361j,0s,0n),+0s,2299161j)> irb> puts "birthdate : #{b.strftime('%a, %d %b %Y')}" birthdate : Wed, 27 Nov 1963 => nil irb> bj = b.jd => 2438361 irb> n = Date.today => #<Date: 2014-10-08 ((2456939j,0s,0n),+0s,2299161j)> irb> puts "now : #{n.strftime('%a, %d %b %Y')}" now : Wed, 08 Oct 2014 => nil irb> nj = n.jd => 2456939 irb> d = n - b => (18578/1) irb> dj = nj - bj => 18578 irb> puts "age : " << ChronicDuration.output( ( ( dj * 24 * 60 * 60 )) ) << " (#{dj} days)" age : 619 mos 8 days (18,578 days) => nil
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expecting: 50 years 10 months 11 days (18,578 days)
Actual: 619 mos 8 days (18,578 days)
The calculation for years seems to be off.
The text was updated successfully, but these errors were encountered: