Bangla (বাংলা)
A comprehensive Rust crate for handling Bangladeshi and Bengali-specific utilities.
Features
- Bangla Date & Calendar: Convert Gregorian dates to accurate Bangla dates (following the 2019 Bangladesh Government calendar revision), generate monthly calendars, and query seasons/weekdays.
- Number & Currency Conversion: Convert ASCII digits to Bengali digits and format numbers into Bangladeshi currency (Taka) using the South Asian numbering system (Lakh/Crore grouping).
- Bangladeshi Addresses: A powerful address builder mapping divisions, districts, upazilas, unions, etc. Includes embedded BBS geo-codes, Bengali nomenclature, and JSON serialization support.
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Note: This crate relies on serde, chrono, and thiserror.
Usage
1. Bangla Date Conversion
Convert Gregorian dates to Bengali dates effortlessly:
use NaiveDate;
use ;
2. Month Calendar Generation
Generate the full 31 or 30 days of a specific Bengali month (automatically handles leap years!):
use ;
3. Number & Currency Formatting
Convert and format numerical values into Bengali text and currency formats:
use ;
4. Bangladeshi Address Builder
Create valid Bangladeshi addresses using exact geo-codes and Bengali strings mapping natively to a JSON structure:
use BanglaAddress;
Contributing
Contributions are always welcome! If you find any issues or have feature requests, please open an issue or submit a pull request on the GitHub repository.
License
MIT License