Skip to content

Commit bb7718f

Browse files
committed
fix: version 0.0.10 readme
1 parent 23f8ba4 commit bb7718f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,20 @@ digits.convert_to_word(500443, ordinal=True) # پانصد هزار و چها
5555
digits.convert_to_word(30000000000) # سی میلیارد
5656
```
5757

58+
to convert words to number, you can use this function with different args:
59+
```python
60+
from persian_tools import digits
61+
62+
digits.convert_from_word('منفی سه هزارمین') # -3000
63+
digits.convert_from_word('منفی سه هزارم', digits='fa') # -۳۰۰۰
64+
digits.convert_from_word('منفی سه هزار') # -3000
65+
digits.convert_from_word('سه هزار دویست و دوازده') # 3212
66+
digits.convert_from_word('دوازده هزار بیست دو', separator=True) # '12,022'
67+
digits.convert_from_word('حقوق شیش صد و ۲۷ میلیون تومان سالانه') # 627000000
68+
```
69+
70+
Note: as you can see in examples, this function will remove ordinal suffix by default.
71+
5872
### separator
5973
Adding or removing thousands separators will handle; default separator is ',' but can change with second input.
6074

0 commit comments

Comments
 (0)