era_ja 1.2.1 → 1.2.2

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: cd72f6ec4123617ec6561a3b45e15eb7d36f9af1b630ea41dd2d50bf5fb2f25d
4
- data.tar.gz: 62a3839d6169ef0e5c729ccccab005d64546abfb1a26124d2009662dfa7c6efe
3
+ metadata.gz: bcf0a0de20e3f4e090835b70d95bd314e00969368a7d11930d4f138b10a5a479
4
+ data.tar.gz: 3faa10bd05537ebe7ac6bd279e32576701b8369ad1ac72c8198f9073fe0a1aa2
5
5
  SHA512:
6
- metadata.gz: 6650611f6f15bcf1c2e65824b288600be79a2e75cd56689ca075ba4de9729072f6da7751df2ef45eaba31588fee1ca21bb0301d1c965b698be5355a5198e97ee
7
- data.tar.gz: 5928320797dcbde74fbef0556ec33879b4cad7ae87e73c449dce515a42ab13c0caf654bfba4eb5fc598784cca949540efc7a1ceb97807baaeb4b6f1097259699
6
+ metadata.gz: fbbb0bf965c38428ba6c63057ab1c49b1dad5912c46480440386e6c5ce01e39185fa4e65b9de8ac990928d818308fb6183b42b1327192ae52b37da7f578a99bf
7
+ data.tar.gz: d2a6df2467587f964a74d869de4e59cae8da84ca062b3dda6f61074be7420d212c97d4111d697046f7b92a551b2059b90b9a4e29975520e0b37bb5c074b47ec6
@@ -26,7 +26,7 @@
26
26
 
27
27
  ### フォーマット文字列
28
28
 
29
- 引数としてstftimeのフォーマット文字列を使用出来ます。
29
+ 引数としてstrftimeのフォーマット文字列を使用出来ます。
30
30
 
31
31
  EraJa#to_eraメソッドでの追加のフォーマット文字列は以下の通りです。
32
32
 
@@ -30,7 +30,7 @@ module EraJa
30
30
 
31
31
  @era_format = format.gsub(/%J/, "%J%")
32
32
  str_time = strftime(@era_format)
33
- if @era_format =~ /%([EOo]|1O)/
33
+ if @era_format =~ /%(-?E|[Oo]|1O)/
34
34
  case
35
35
  when self.to_time < ::Time.mktime(1912,7,30)
36
36
  str_time = era_year(year - 1867, :meiji, era_names)
@@ -1,3 +1,3 @@
1
1
  module EraJa
2
- VERSION = "1.2.1"
2
+ VERSION = "1.2.2"
3
3
  end
@@ -26,6 +26,10 @@ RSpec.shared_examples "should equal '令和01年07月02日'" do
26
26
  context "with '%O%J%-E年%m月%d日'" do
27
27
  it { expect(subject.to_era("%O%J%-E年%m月%d日")).to eq "令和元年07月02日" }
28
28
  end
29
+
30
+ context "with '%-E年%-m月%-d日'" do
31
+ it { expect(subject.to_era("%-E年%-m月%-d日")).to eq "1年7月2日" }
32
+ end
29
33
  end
30
34
 
31
35
  RSpec.shared_examples "should equal 'R01.05.01'" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: era_ja
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - tomi
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-23 00:00:00.000000000 Z
11
+ date: 2020-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -125,7 +125,7 @@ homepage: https://github.com/tomiacannondale/era_ja
125
125
  licenses:
126
126
  - MIT
127
127
  metadata: {}
128
- post_install_message:
128
+ post_install_message:
129
129
  rdoc_options: []
130
130
  require_paths:
131
131
  - lib
@@ -140,8 +140,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
142
  requirements: []
143
- rubygems_version: 3.1.2
144
- signing_key:
143
+ rubygems_version: 3.1.4
144
+ signing_key:
145
145
  specification_version: 4
146
146
  summary: Convert Date or Time instance to String of Japanese era.
147
147
  test_files: