e1515si_check_age 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/e1515si_check_age/version.rb +1 -1
- data/lib/e1515si_check_age.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 272b2f2f7c84176b6e9a75ca7b36dea73ccd9365
|
4
|
+
data.tar.gz: 2296ed430657ebd41a6fac9cb60d182583451c36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dfd9bcc66debcbea1dad8f7d0113d83063ce8bcf2b78b30a7b0dac3c7dcb7b4111395b3820342cacec8cfa83515bf743af8a32dafca8e2afd2627f4526ca805
|
7
|
+
data.tar.gz: 772aeca5c41072764ff6a112f20b745357926a35364330a11c279b7879e0e5fc6665cd54be9f4845540929a3ebdbd6e81e70bde91ec8a3efcc7f81f120cd6967
|
data/lib/e1515si_check_age.rb
CHANGED
@@ -14,7 +14,7 @@ class E1515si_check_age
|
|
14
14
|
birth = Date.strptime(inputString,'%Y/%m/%d')
|
15
15
|
lifeYear = Time.now.year - birth.year
|
16
16
|
#今年誕生日を迎えていない場合は、年齢から1を引く
|
17
|
-
if(Date.new(Time.now.year,birth.month,birth.day) >= Date.today(
|
17
|
+
if(Date.new(Time.now.year,birth.month,birth.day) >= Date.today())
|
18
18
|
lifeYear -= 1;
|
19
19
|
end
|
20
20
|
#標準出力に表示する
|