class Date

Public Instance Methods

age() click to toggle source
# File lib/age_jp/core_ext/date.rb, line 2
def age
  AgeJp::Calculator.new(self).age_at
end
age_at(date) click to toggle source
# File lib/age_jp/core_ext/date.rb, line 6
def age_at(date)
  AgeJp::Calculator.new(self).age_at(date)
end
age_jp() click to toggle source
# File lib/age_jp/core_ext/date.rb, line 10
def age_jp
  AgeJp::Calculator.new(self).age_jp_at
end
age_jp_at(date) click to toggle source
# File lib/age_jp/core_ext/date.rb, line 14
def age_jp_at(date)
  AgeJp::Calculator.new(self).age_jp_at(date)
end
east_asian_age_reckoning() click to toggle source
# File lib/age_jp/core_ext/date.rb, line 18
def east_asian_age_reckoning
  AgeJp::Calculator.new(self).east_asian_age_reckoning_at
end
east_asian_age_reckoning_at(date) click to toggle source
# File lib/age_jp/core_ext/date.rb, line 22
def east_asian_age_reckoning_at(date)
  AgeJp::Calculator.new(self).east_asian_age_reckoning_at(date)
end
insurance_age() click to toggle source
# File lib/age_jp/core_ext/date.rb, line 26
def insurance_age
  AgeJp::Calculator.new(self).insurance_age_at
end
insurance_age_at(date) click to toggle source
# File lib/age_jp/core_ext/date.rb, line 30
def insurance_age_at(date)
  AgeJp::Calculator.new(self).insurance_age_at(date)
end
to_years_old_jp(n) click to toggle source
# File lib/age_jp/core_ext/date.rb, line 36
def to_years_old_jp(n)
  return to_years_old(n).change(day: 28) if leap? && month == 2 && day == 29

  to_years_old(n).yesterday
end