Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 628 Bytes

README.md

File metadata and controls

29 lines (18 loc) · 628 Bytes

Number to letters

A python library to convert numbers to their catalan text representation. Decimals are managed as currency (1.5 is 'one and fifty')

Quick start

Install it using pip:

pip install nombrestolletres

Usage

Import the library in your project and use it:

from nombrestolletres import number_to_letters

number_to_letters(11452915)
> 'onze milions quatre-cents cinquanta-dos mil nou-cents quinze'

Examples

  • 1245: 'mil dos-cents quaranta-cinc'
  • -30: 'menys trenta'
  • 0: 'zero'
  • 23.5: 'vint-i-tres amb cinquanta'