0.0
No commit activity in last 3 years
No release in over 3 years
Number conversion between Arabic numerals and Japanese numerals
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0
~> 3.0
 Project Readme

numerals_jp

Gem Version Build Status

A numerals library for Japanese

This library converts between Arabic numerals and Japanese numerals
which are often used(i.e., from 1 to 9,999,999,999,999,999).

Installation

Add this line to your application's Gemfile:

gem 'numerals_jp'

And then execute:

$ bundle

Or install it yourself as:

$ gem install numerals_jp

Usage

require 'numerals_jp'

Convert from Japanese numerals

"三十六".jp_to_num
# => "36"

This method just replaces Japanese numerals with Arabic numerals.

"十二月三十一日".jp_to_num
# => "12月31日"

Convert to Japanese numerals

106.to_jp
# => "百六"

19937.to_jp
# => "一万九千九百三十七"

Roadmap

Done:

  • Support converting from integer to Japanese numerals.

Pending:

  • Support converting from Japanese numerals without factor units.
  • Support converting from Arabic numerals with Japanese factor units.

Other Integrations

Code Climate Coverage Status Inline docs

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/paralleltree/numerals_jp.

License

The gem is available as open source under the terms of the MIT License.