go_time 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/go_time/ext/ja.rb +1 -0
- data/lib/go_time/version.rb +1 -1
- data/lib/go_time.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62649a3728b881a187b666a9f060df1003df0d9479e8aba2e018529ec493ea70
|
4
|
+
data.tar.gz: ec90a45596bba2d942340ea14a78b5920eafd1cbe18afad56d85af7306e726cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 31c892a6d5dd6a69f68b8e1ee7cf11a90420a493ac1c917fe126af8f7a509ef3a73a84b789897149a6b295cb70f3713e11b32ad2c56cb6761168640a4ee3caba
|
7
|
+
data.tar.gz: 7ec674c882bd80728c47e88a626e227575eba63c3b4ca2256fae73a05a304bd39e3d31956c52f87c8da91744798ac5b65d6eb05d1dcc8c4b4d0dfba3dfb31d8f
|
data/README.md
CHANGED
@@ -69,8 +69,8 @@ GoTime has extensions that support date and time representations in various lang
|
|
69
69
|
```ruby
|
70
70
|
require "go_time/ext/ja" # Japanese
|
71
71
|
time = Time.utc(2019, 5, 6, 7, 8, 9)
|
72
|
-
|
73
|
-
#
|
72
|
+
GoTime.strftime(time, "平成十八年(二〇〇六年)一月二日(火) 午後三時四分五秒")
|
73
|
+
# => "令和元年(二〇一九年)五月六日(月) 午前七時八分九秒"
|
74
74
|
```
|
75
75
|
|
76
76
|
## Development
|
data/lib/go_time/ext/ja.rb
CHANGED
data/lib/go_time/version.rb
CHANGED
data/lib/go_time.rb
CHANGED
@@ -51,7 +51,7 @@ module GoTime
|
|
51
51
|
def self.convert(fmt, exception: false)
|
52
52
|
ret = fmt.gsub(BASIC_CONVERT_REGEXP, BASIC_CONVERT_TABLE)
|
53
53
|
if exception
|
54
|
-
matched = ret.match(@
|
54
|
+
matched = ret.match(Regexp.union(@convert_table.keys - BASIC_CONVERT_TABLE.keys))
|
55
55
|
raise ArgumentError, %(unsupported syntax "#{matched}") if matched
|
56
56
|
end
|
57
57
|
ret
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: go_time
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nodai2hITC
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Formats Time according to Go-like format like "01/02 03:04:05PM '06 -0700"
|
14
14
|
email:
|