Skip to content

Commit 8027be8

Browse files
author
Yulian Ashikov
committed
Enhanced the readme
1 parent 9535227 commit 8027be8

1 file changed

Lines changed: 29 additions & 2 deletions

File tree

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,23 @@
55

66
A .NET library that converts currency values into words in Bulgarian for accounting purposes.
77

8-
Example: Input: `32048.27` Outpud: `тридесет и две хиляди и четиридесет и осем лева и 27 ст.`
8+
Example BGN: Input: `32048.27` Output: `тридесет и две хиляди и четиридесет и осем лева и 27 ст.`
9+
Example EUR: Input: `32048.27` Output: `тридесет и две хиляди и четиридесет и осем евро и 27 ц.`
910

1011
## Functionality
1112
- It takes into consideration the [grammatical gender](https://en.wikipedia.org/wiki/Grammatical_gender).
13+
- It supports negative values.
1214
- It writes decimal fractions in the short form: `X лева и ст.` when the value is above zero, and the full word when it is under the value of `1`: `девет стотинки`.
13-
- The current maximum value is `999999.99` and the minimum is `0.`.
15+
- The current maximum value is `999999.99` and the minimum is `-999999.99`.
16+
17+
## Supported currencies
18+
19+
The library supports the following currencies through predefined descriptors:
20+
21+
| Currency | Code | Major Unit | Minor Unit | Usage |
22+
|----------|------|------------|------------|-------|
23+
| Bulgarian Lev | BGN | лев/лева | стотинка/стотинки | `CurrencyDescriptor.Bgn` |
24+
| Euro | EUR | евро | евроцент/евроцента | `CurrencyDescriptor.Euro` |
1425

1526
## AI Story
1627
This project is my first attempt to build something with GitHub Copilot, with as little intervention as possible.
@@ -33,6 +44,7 @@ dotnet add package OneBitSoftware.Slovom
3344

3445
## Examples
3546

47+
## BGN examples
3648
|Input|Output|
3749
|--------|-------|
3850
|0|нула лева|
@@ -46,6 +58,21 @@ dotnet add package OneBitSoftware.Slovom
4658
|2014.78|две хиляди и четиринадесет лева и 78 ст.|
4759
|32478.27|тридесет и две хиляди четиристотин седемдесет и осем лева и 27 ст.|
4860

61+
62+
## EURO examples
63+
|Input| Output |
64+
|--------|-------------------------------------------------------------------|
65+
|0| нула евро |
66+
|1| едно евро |
67+
|2| две евро |
68+
|19| деветнадесет евро |
69+
|0.1| десет евроцента |
70+
|1.20| едно евро и 20 ц. |
71+
|1019.78| хиляда и деветнадесет евро и 78 ц. |
72+
|1119.78| хиляда сто и деветнадесет евро и 78 ц. |
73+
|2014.78| две хиляди и четиринадесет евро и 78 ц. |
74+
|32478.27| тридесет и две хиляди четиристотин седемдесет и осем евро и 27 ц. |
75+
4976
## Contributing
5077
Feel free to raise a PR to improve the code quality or add new features.
5178

0 commit comments

Comments
 (0)