personnummer 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of personnummer might be problematic. Click here for more details.
- data/Changelog +5 -1
- data/lib/personnummer.rb +3 -3
- metadata +2 -2
data/Changelog
CHANGED
data/lib/personnummer.rb
CHANGED
@@ -50,9 +50,9 @@ class Personnummer
|
|
50
50
|
# Get the region name
|
51
51
|
@region = region_name(serial)
|
52
52
|
|
53
|
-
#
|
54
|
-
@age = today
|
55
|
-
|
53
|
+
# (Less) naïve age calculation
|
54
|
+
@age = ((today - @born).to_i/365)
|
55
|
+
|
56
56
|
# Check if the person is female based the serial (even == female)
|
57
57
|
@female = (serial % 2 == 0)
|
58
58
|
else
|