Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/a1501da_birthday.rb
Instance Method Summary collapse
Instance Method Details
#age(calcDay = Time.now) ⇒ Object
2 3 4 |
# File 'lib/a1501da_birthday.rb', line 2 def age(calcDay = Time.now) (calcDay.strftime("%Y%m%d").to_i-self.strftime("%Y%m%d").to_i)/10000 end |