| Crates.io | ponjika |
| lib.rs | ponjika |
| version | 0.2.0 |
| created_at | 2024-12-28 05:06:42.634685+00 |
| updated_at | 2025-01-01 01:42:17.609864+00 |
| description | Ponjika is a Bangla calendar library for Rust. |
| homepage | |
| repository | https://github.com/mustakimur/ponjika |
| max_upload_size | |
| id | 1496869 |
| size | 80,465 |
Welcome to Ponjika and the year 2025. This crate will support many features relevant to the Bengali (Bangladeshi) calendar. Our goal is to minimize external resource dependency and safely compute Bengali dates, seasons, holidays, etc. If you have a feature idea that aligns with the crate's purpose, please create an issue with the tag [Feature] in the issue title. If you have found a bug, please create an issue with the tag [Bug] in the issue title.
Q1: Can I create a Gregorian date and convert it to a Bengali date?
EnglishDate. For example: let date = EnglishDate::create_date(30, EnglishMonths::November, 2010);let bengali_date = get_bengali_date_from_gregorian(english_date);DateError for many different reasons including invalid date, arithmetic operation, casting, etc. So, make sure you do handle all the possible error cases.examples/gregorianToBengali.rs.Q2: Can I create a Bengali date and convert it to a Gregorian date?
BengaliDate. For example: let bengali_date = BengaliDate::create_date(3, BengaliMonths::Falgun, 1430);let english_date = get_gregorian_date_from_bengali(bengali_date);DateError for many different reasons including invalid date, arithmetic operation, casting, etc. So, make sure you do handle all the possible error cases.examples/bengaliToGregortian.rs.The project currently support afl.rs fuzzing. Take a look into fuzz directory. To run the fuzzer:
cd fuzz
cargo afl build
cargo afl fuzz -i in/english_create_date -o out/english_create_date target/debug/test_english_date
cargo afl fuzz -i in/bengali_create_date -o out/bengali_create_date target/debug/test_bengali_date
This project is licensed under GPL-3.0.