Bangla is a Python package for converting Gregorian dates to the Bengali calendar, translating English numerals to Bangla numerals, and generating Bangla ordinals for dates. It computes the full Bengali calendar date, including year, month, day, weekday, season, and ordinal based on the revised Bengali calendar (https://en.wikipedia.org/wiki/Bengali_calendars) officially adopted in Bangladesh in 1987. (For Bengali communities in India, the calendar may differ slightly.)
The package also allows converting English numeric strings (e.g., “123”) into Bangla numerals (e.g., “১২৩”). It is compatible with Linux, macOS, and Windows systems.
Features
Convert Gregorian dates to Bengali calendar , including:: - Bangla Date (১-৩১)
Bangla Month (“বৈশাখ”, “জ্যৈষ্ঠ”, “আষাঢ়”, “শ্রাবণ”, “ভাদ্র”, “আশ্বিন”, “কার্তিক”, “অগ্রহায়ণ”, “পৌষ”, “মাঘ”, “ফাল্গুন”, “চৈত্র”)
Bangla Year (১৯৮৭ - )
Bangla Season (“গ্রীষ্ম”, “বর্ষা”, “শরৎ”, “হেমন্ত”, “শীত”, “বসন্ত”)
Bangla Weekday (“শনিবার”, “রবিবার”, “সোমবার”, “মঙ্গলবার”, “বুধবার”, “বৃহস্পতিবার”, “শুক্রবার”)
Bangla Weekday (“শনিবার”, “রবিবার”, “সোমবার”, “মঙ্গলবার”, “বুধবার”, “বৃহস্পতিবার”, “শুক্রবার”)
Bangla Ordinal for dates (“পহেলা”, “দোসরা”, “তেসরা”, … , “একত্রিশে”)
Convert English numeric string to Bangla numeric string (123456 -> ১২৩৪৫৬).
Installation
We recommend install bangla through pip install.
$ pip install bangla
Example
To get today’s date in Bangla calendar:
import bangla
bangla_date = bangla.get_date()
print(bangla_date)
# Output: {'date': '৮', 'month': 'আষাঢ়', 'year': '১৪২৪', 'season': 'বর্ষা', 'weekday': 'বৃহস্পতিবার'}
# Use bangla.get_date(ordinal = True) to include the Bangla ordinal
To convert any Gregorian date to Bangla date :
import bangla
bangla_date = bangla.get_date(20, 6, 2017) # date, month, year
print(bangla_date)
# Output: {'date': '৬', 'month': 'আষাঢ়', 'year': '১৪২৪', 'season': 'বর্ষা', 'weekday': 'মঙ্গলবার'}
To convert any English numeric string to Bangla numeric string :
import bangla
bangla_numeric_string = bangla.convert_english_digit_to_bangla_digit("123456")
print(bangla_numeric_string)
# Output: ১২৩৪৫৬
Contributors
Want to contribute?
Submit a Github Pull Request (must add/update unittests) https://github.com/arsho/bangla/pulls
For suggestions or feedback, please contact https://arshovon.com/
Thanks
Influenced by বঙ্গাব্দ - jQuery Plugin https://github.com/nuhil/bangla-calendar
Metadata
Release files for bangla 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bangla-0.0.6.tar.gz | 8.0 kB | Without provenance | Details for bangla-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bangla-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for bangla-0.0.6-py3-none-any.whl |
Total release size: 16.0 kB
Release files / bangla-0.0.6.tar.gz
| Download URL | bangla-0.0.6.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
affe406956a3696351c134646373b9f7e6967b0ac9d919dc967736f67dc60b1b
|
|
BLAKE2b-256 checksum How to use checksums |
466eca887f2cdaaeefe59e933111166ecf3f369de273e31ad5e35a3915902534
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / bangla-0.0.6-py3-none-any.whl
| Download URL | bangla-0.0.6-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b03c035f4638b900d3b3d18bb0c4bff9706d5f2df5506e6623872276ddde4847
|
|
BLAKE2b-256 checksum How to use checksums |
abf7b89ee617a366b174c08f1111e4845ee5e2ac359abc734bfc4ca9426fe5d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for bangla 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.