tax_jp 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 904f7717769647f9da08993e625ac91281a7f1ff1bbe22d0874ad904f8244a10
4
- data.tar.gz: a3acce33105643a945c4daf4f60365fdf00476edb74a76e2221a8e5cb6cbb6ee
3
+ metadata.gz: 11a54f4e4111eb0c5218fbf446e5ce265341bcd87989e1e7654ef6405742f845
4
+ data.tar.gz: 7051c81595882053ff3c15baa5ef41cee96ce0b8869dd74d480e3180bd428a3f
5
5
  SHA512:
6
- metadata.gz: a5ceecdd7705804be8ca91a32ab64bca1bd850ba252ade724a9d73236092a991a7f0a2e14d0f942a7f3d64d70515a5d8c4071813a26f256e62ecbf09ce93aeda
7
- data.tar.gz: 4bd87db6417730cd1ea0a6baae4bcaea6aa8c33fb420d2a2913fe45ca786b5406af6206595f597e1af422f669178eee6d212150c683f879543dc7422bfbf17ac
6
+ metadata.gz: 1f162c5013f8694da55e3fbb86fd1a5e4acb94b7eee0b15104730682334ef38bee3228975dcf137e4ccdd26f641d83ab36ee869c661452bf431a1b541f48748f
7
+ data.tar.gz: f9658e9db888dfb35da7802908d15527501f51573198a7500c673b076d495e75c4d8515dbffc607baaac9e768b141e825f268ecc4f4d0f0a661d38cdf6b8a561
@@ -4,4 +4,4 @@
4
4
  2010-04-01 2012-03-31 0.006 0.0095 0.007 0.0105 0.007 0.0115
5
5
  2012-04-01 2016-03-31 0.005 0.0085 0.006 0.0095 0.006 0.0105
6
6
  2016-04-01 2017-03-31 0.004 0.007 0.005 0.008 0.005 0.009
7
- 2017-04-01 2019-03-31 0.003 0.006 0.004 0.007 0.004 0.008
7
+ 2017-04-01 2020-03-31 0.003 0.006 0.004 0.007 0.004 0.008
@@ -5,18 +5,11 @@ module TaxJp
5
5
  @@_gengou = TaxJp::Utils.load_yaml('元号.yml')
6
6
 
7
7
  def self.to_seireki(gengou, date_jp)
8
- target_gengou = nil
9
- @@_gengou.invert.keys.each do |start_gengou|
10
- if start_gengou == gengou.to_s
11
- target_gengou = start_gengou
12
- break
13
- end
14
- end
15
-
8
+ target_gengou = @@_gengou.invert.keys.find{|start_gengou| start_gengou == gengou.to_s }
16
9
  return nil unless target_gengou
17
10
 
18
- start_year = @@_gengou.invert[target_gengou].to_i
19
- return (start_year + year_jp.to_i - 1).to_s
11
+ start_date = @@_gengou.invert[target_gengou]
12
+ Date.new(start_date.year + date_jp.year - 1, date_jp.month, date_jp.day)
20
13
  end
21
14
 
22
15
  def self.to_wareki(date, only_date: false, format: '%y年%m月%d日')
@@ -1,3 +1,3 @@
1
1
  module TaxJp
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tax_jp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichylinux
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-04-19 00:00:00.000000000 Z
12
+ date: 2019-04-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
238
238
  version: '0'
239
239
  requirements: []
240
240
  rubyforge_project:
241
- rubygems_version: 2.7.6
241
+ rubygems_version: 2.7.7
242
242
  signing_key:
243
243
  specification_version: 4
244
244
  summary: 税金計算ライブラリ