https://github.com/zviryatko/num2uah
A Go library for converting numbers to Ukrainian currency representation (hryvnias and kopiyok) with proper grammatical forms.
https://github.com/zviryatko/num2uah
Last synced: 9 months ago
JSON representation
A Go library for converting numbers to Ukrainian currency representation (hryvnias and kopiyok) with proper grammatical forms.
- Host: GitHub
- URL: https://github.com/zviryatko/num2uah
- Owner: zviryatko
- License: mit
- Created: 2025-08-21T10:41:34.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-21T10:45:40.000Z (10 months ago)
- Last Synced: 2025-08-21T12:34:38.087Z (10 months ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# num2uah
A Go library for converting numbers to Ukrainian currency representation (hryvnias and kopiyok) with proper grammatical forms.
## Installation
```bash
go get github.com/zviryatko/num2uah
```
## Usage
```go
package main
import (
"fmt"
"github.com/zviryatko/num2uah"
)
func main() {
// Convert float64 to Ukrainian currency text
result := num2uah.Convert(1234.56)
fmt.Println(result)
// Output: одна тисяча двісті тридцять чотири гривні та п'ятдесят шість копійок
// More examples
fmt.Println(num2uah.Convert(1.01))
// Output: одна гривня та одна копійка
fmt.Println(num2uah.Convert(2222.22))
// Output: дві тисячі двісті двадцять дві гривні та двадцять дві копійки
}
```
## License
This project is available under the MIT License.