fe_core_ext 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fe_core_ext/core_ext/date.rb +6 -0
- data/lib/fe_core_ext/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 249b09dcecf83d524950df8542579dc4550a7b96
|
4
|
+
data.tar.gz: ef8803909071a43fd1a68a70ca0fdb86d24ed845
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 638cd392368859d56fdadfccd8fc4a37d82ad37ef576b1320c2eb0e52917f0e6fdaccb6b2f8719e2fe111bbc5364aa818005264f6056c01ab7b88fd70bb221a5
|
7
|
+
data.tar.gz: a7213fbd808f50e80aeeea6d9bf69521a471b19975ba12b04dbe7008cddbf185e823f471c84c5f9c96d4fae03c9fd688ac40da42fc468bfa5dd3745cf41c04aa
|
@@ -9,6 +9,12 @@ module FeCoreExt::CoreExt::Date
|
|
9
9
|
date = parse(string)
|
10
10
|
date > current ? date : date + 1.year
|
11
11
|
end
|
12
|
+
|
13
|
+
def parse_heisei(string)
|
14
|
+
string.match('平成(\d+)年(\d+)月(\d+)日') {
|
15
|
+
Date.new($1.to_i + 1988, $2.to_i, $3.to_i)
|
16
|
+
}
|
17
|
+
end
|
12
18
|
end
|
13
19
|
|
14
20
|
class Date
|
data/lib/fe_core_ext/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fe_core_ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tetsu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|