Method: IdentityCode::EE#birth_date
- Defined in:
- lib/identity_code/ee.rb
#birth_date ⇒ Object
59 60 61 62 63 64 65 66 |
# File 'lib/identity_code/ee.rb', line 59 def birth_date return unless valid? year = century + @code[1..2].to_i month = @code[3..4].to_i day = @code[5..6].to_i return unless Date.valid_date?(year, month, day) Date.new(year, month, day) end |