personnummer 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
|