date_converter_ja 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6aa869581620b9f4ec0007cf19f5e75f0a84eed09257befd924980f5fc2d9b65
4
- data.tar.gz: 2aaa3dc7903e511fbaad0e2eaeaef8a4dec64d36be93dbe477499f9a28099596
3
+ metadata.gz: 5a6e60b9fe10601ced62c4c41f4a4c63cbd0a728831c7bbb94d1678514a41518
4
+ data.tar.gz: 01471fc8108ce1d96fd9963574ad75842127a8f92772090309234aff88e574c7
5
5
  SHA512:
6
- metadata.gz: a84f5444644f2c9a2b22172165738843dfad7e406dd54f506896fa3626a548c8af46019788b6070772e7a2f55f078a124f40c9dafb67a1979c9fa40b5aa08c09
7
- data.tar.gz: dc73f7446f00927da6d09944cb94e1d04c60afeb770215704e4286508ec5289ac1f710e36cf9eba5e1175a543c9256b63699425f7c2863db5e572424d19298ac
6
+ metadata.gz: 710c04ef8951009aca3fa77cdca8e2b2ce7dfe4351e582295931b4fe56f8a0efe6f196a3ed88467e226788119192451a507274939b72e4705678ae61d7f9ac77
7
+ data.tar.gz: 243de5a6a250833d9f3db0898e62bf1f760504309c37155f5470dad4a9afa9d11e29cf47f82d1e290a1dda9a14b054911979e7c3445c2f20628f9d323a59cec9
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ["holasoynaoki"]
9
9
  spec.email = ["naoki13futsal@gmail.com"]
10
10
 
11
- spec.summary = "date_converter_ja"
12
- spec.description = "date_converter_ja"
11
+ spec.summary = "Format the date in a nice way gem."
12
+ spec.description = "Format the date in a nice way gem."
13
13
  spec.homepage = "https://github.com/holasoynaoki/date_converter_ja"
14
14
  spec.license = "MIT"
15
15
  spec.required_ruby_version = ">= 2.6.0"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DateConverterJa
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
@@ -5,7 +5,23 @@ require_relative "date_converter_ja/version"
5
5
  module DateConverterJa
6
6
  class Error < StandardError; end
7
7
 
8
- def ampm_jp
8
+ def time_with_ampm
9
+ self.strftime("#{ampm} %H:%M")
10
+ end
11
+
12
+ def time_without_ampm
13
+ self.strftime("%H:%M")
14
+ end
15
+
16
+ def date_and_time_with_ampm
17
+ self.strftime("%Y/%m/%d(%a) #{ampm} %H:%M")
18
+ end
19
+
20
+ def date_and_time_without_ampm
21
+ self.strftime("%Y/%m/%d(%a) %H:%M")
22
+ end
23
+
24
+ private def ampm
9
25
  case self.hour
10
26
  when 12
11
27
  '昼'
@@ -22,5 +38,5 @@ module DateConverterJa
22
38
  end
23
39
 
24
40
  class Date
25
- include AmPm
41
+ include DateConverterJa
26
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: date_converter_ja
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - holasoynaoki
@@ -10,7 +10,7 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2022-08-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: date_converter_ja
13
+ description: Format the date in a nice way gem.
14
14
  email:
15
15
  - naoki13futsal@gmail.com
16
16
  executables: []
@@ -51,5 +51,5 @@ requirements: []
51
51
  rubygems_version: 3.3.18
52
52
  signing_key:
53
53
  specification_version: 4
54
- summary: date_converter_ja
54
+ summary: Format the date in a nice way gem.
55
55
  test_files: []