2017 © Pedro Peláez
 

library japanese-numerals

Library to convert Japanese numeral to their Western variants (AKA Hindu-Arabic numerals)

image

sanmai/japanese-numerals

Library to convert Japanese numeral to their Western variants (AKA Hindu-Arabic numerals)

  • Thursday, November 30, 2017
  • by sanmai
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Build Status Coverage Status Latest Stable Version License, (*1)

JapaneseNumeral

Library to convert Japanese numeral to their Western variants (AKA Hindu-Arabic numerals), (*2)

Installation is simple:, (*3)

composer require sanmai/japanese-numerals

Usage

To convert a number from Hindu-Arabic numerals to Japanese numerals, use:, (*4)

$japanese = \JapaneseNumerals\JapaneseNumerals::fromArabicToJapanese(123);
var_dump($japanese);

Should output:, (*5)

string(12) "百二十三"

To convert a string of Japanese numerals to Hindu-Arabic numerals, use:, (*6)

$arabic = \JapaneseNumerals\JapaneseNumerals::fromJapaneseToArabic('二千二十五');
var_dump($arabic);

Should output:, (*7)

string(4) "2025"

Known bugs

This library isn't bug-free. Most notably it fails to interpret 九百八十三万六千七百三 as 9836703 and 二十億三千六百五十二万千八百一 as 2036521801, examples given in the section on large numbers in the Wikipedia article., (*8)

Acknowledgements

Special thanks go to Navarr Barnier (@navarr) for the initial implementation of the algorithm., (*9)

The Versions

30/11 2017

dev-master

9999999-dev

Library to convert Japanese numeral to their Western variants (AKA Hindu-Arabic numerals)

  Sources   Download

MIT

The Development Requires

30/11 2017

v0.1

0.1.0.0

Library to convert Japanese numeral to their Western variants (AKA Hindu-Arabic numerals)

  Sources   Download

MIT

The Development Requires