0.0
No commit activity in last 3 years
No release in over 3 years
This gem convert numeral into Chinese Numeral or full-width numeral.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 10.0
~> 3.0
 Project Readme

ConvertNumeral

This gem convert arabic numeral what is 0 to 9999_9999_9999_9999_9999_9999_9999_9999_9999_9999_9999_9999_9999_9999_9999_9999_9999_9999 into chinese numeral, and vice versa.

Installation

Add this line to your application's Gemfile:

gem 'convert_numeral'

And then execute:

$ bundle

Or install it yourself as:

$ gem install convert_numeral

Usage

'零'.to_arabic_numeral
# => 0

'千五百十'.to_arabic_numeral
#=> 1510

'千九百億一千万一千'.to_arabic_numeral
#=> 190010001000

0.to_chinese_numeral
#=> "零"

1510.to_chinese_numeral
#=> "千五百十"

190010001000.to_chinese_numeral
#=> "千九百億一千万一千"

Contributing

  1. Fork it ( https://github.com/sanfrecce-osaka/convert_numeral/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

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