README.md in japanese_calendar-0.3.0 vs README.md in japanese_calendar-0.3.1
- old
+ new
@@ -18,19 +18,28 @@
$ gem install japanese_calendar
## Usage
-To get a Japanese era name, use the `era_name` method:
+To get the Japanese era name, use the `era_name` method:
```
Time.new(1989, 1, 8).era_name # => "平成"
Time.new(1926, 12, 25).era_name # => "昭和"
Time.new(1912, 7, 30).era_name # => "大正"
Time.new(1873, 1, 1).era_name # => "明治"
```
+If you want to get the Japanese era name in romaji, pass `:romaji`:
+
+```
+Time.new(1989, 1, 8).era_name(:romaji) # => "Heisei"
+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"
+```
+
You can convert to a Japanese year with the `era_year` method:
```
Time.new(2016, 12, 11).era_year # => 28
Time.new(1989, 1, 7).era_year # => 64
@@ -56,11 +65,11 @@
time.strftime("%Q") # => "日曜日"
time.strftime("%q") # => "日"
# More examples
time.strftime("%K%-J年%-m月%-d日(%q)") # => "平成1年1月1日(日)"
-time.strftime("%o%J.%m.%d") # => H01.01.01
-time.strftime("%B %-d, %-Y (%O %-J)") # => January 1, 1989 (Heisei 1)
+time.strftime("%o%J.%m.%d") # => "H01.01.01"
+time.strftime("%B %-d, %-Y (%O %-J)") # => "January 1, 1989 (Heisei 1)"
```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.