Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Jose Luis Duran's latest activity

Monday, July 12 2010
5083 If 1.year = 365.25.days, then 1.month should be equal to 30.4375.days was updated in Ruby on Rails
  • Jose Luis Duran
    Jose Luis Duran commented at 2:36 AM

    OK got it. Sorry!

    require 'timecop'
    
    Timecop.freeze(Time.now)
    if 1.year.ago == 12.months.ago
      puts "Everything is OK!"
    end
    
Sunday, July 11 2010
5083 If 1.year = 365.25.days, then 1.month should be equal to 30.4375.days was updated in Ruby on Rails
  • Jose Luis Duran
    Jose Luis Duran commented at 11:03 PM

    Ok. Will do.

    It's just:

    if 1.year.to_i != 12.months.to_i
      puts "something must be wrong!"
    end
    

    Thank you.

  • Jose Luis Duran
    Jose Luis Duran created the ticket at 11:34 AM

    in /activesupport/lib/active_support/core_ext/integer/time.rb:

    #   # equivalent to 30.4375.days.to_i.from_now
    #   1.month.to_i.from_now
    
    def months
      ActiveSup...