README.md in japanese_calendar-0.4.1 vs README.md in japanese_calendar-0.4.2
- old
+ new
@@ -38,10 +38,20 @@
Time.new(1926, 12, 25).era_name(:romaji) # => "Showa"
Time.new(1912, 7, 30).era_name(:romaji) # => "Taisho"
Time.new(1873, 1, 1).era_name(:romaji) # => "Meiji"
```
+The following examples show how to check the Japanese era:
+
+```
+Time.new(2019, 5, 1).reiwa? # => true
+Time.new(1989, 1, 8).heisei? # => true
+Time.new(1926, 12, 25).showa? # => true
+Time.new(1912, 7, 30).taisho? # => true
+Time.new(1873, 1, 1).meiji? # => true
+```
+
You can convert to a Japanese year with the `era_year` method:
```
Time.new(2019, 5, 1).era_year # => 1
Time.new(2019, 4, 30).era_year # => 31
@@ -55,9 +65,10 @@
```
time = Time.new(2019, 5, 1)
# Japanese era
time.strftime("%JN") # => "令和"
+time.strftime("%Jn") # => "令"
time.strftime("%JR") # => "Reiwa"
time.strftime("%^JR") # => "REIWA"
time.strftime("%Jr") # => "R"
time.strftime("%Jy") # => "01"
time.strftime("%-Jy") # => "1"