Skip to main content

বাংলা তারিখ রূপান্তরকারী (Bangla Date)

CI

এই প্রজেক্টটি গ্রেগরিয়ান তারিখকে বাংলা তারিখে রূপান্তর করে এবং সংশ্লিষ্ট ঋতুসহ বাংলা সংখ্যায় প্রদর্শন করে। এটি একটি importable Python module এবং একটি সহজ CLI - দুটোই সরবরাহ করে।

এটি পশ্চিমবঙ্গে প্রচলিত বাংলা পঞ্জিকা (দৃক সিদ্ধান্ত) ব্যবহার করে; মাস নির্ধারিত হয় কলকাতার সূর্যোদয়ের সময় সূর্যের সায়ন রাশি অনুসারে, তাই মাসের দৈর্ঘ্য ২৯ থেকে ৩২ দিন পর্যন্ত পরিবর্তিত হয়। এটি বাংলাদেশের ২০১৯-সংশোধিত জাতীয় পঞ্জিকার সমান নয়।

বৈশিষ্ট্যসমূহ

  • গ্রেগরিয়ান তারিখ থেকে বাংলা তারিখে রূপান্তর।
  • বাংলা মাস ও ঋতু নির্ণয় (পশ্চিমবঙ্গের প্রচলিত দৃক সিদ্ধান্ত পঞ্জিকা অনুসারে)।
  • আউটপুটে বাংলা সংখ্যা ব্যবহার।
  • সূর্যোদয়ের সময় সূর্যের সায়ন রাশি অনুসারে পরিবর্তনশীল মাসের দৈর্ঘ্য (২৯–৩২ দিন) গণনা (রেফারেন্স স্থান: কলকাতা)।
  • কোনো runtime dependency নেই।

প্রয়োজনীয়তা

  • Python 3.13 বা নতুনতর

ইনস্টলেশন

uv দিয়ে CLI টুল হিসেবে সরাসরি ইনস্টল:

uv tool install "git+https://github.com/evolve75/bangla-date"

লোকাল ক্লোন থেকে ইনস্টল:

git clone https://github.com/evolve75/bangla-date
cd bangla-date
uv tool install .

ডেভেলপমেন্টের জন্য নির্ভরতাসহ পরিবেশ প্রস্তুত:

uv sync

uv ছাড়া ঐচ্ছিকভাবে editable install:

python3 -m pip install -e .

ব্যবহারবিধি

টার্মিনালে নিচের যেকোনো একটি কমান্ড চালান:

python3 -m bangla_date

অথবা compatibility wrapper ব্যবহার করতে চাইলে:

python3 bangla-date.py

ইনস্টল করা entrypoint থাকলে:

bangla-date

সাহায্য বা সংস্করণ দেখতে চাইলে:

bangla-date --help
bangla-date --version

কমান্ডটি বর্তমান দিনের বাংলা তারিখ এবং ঋতু প্রদর্শন করবে।

কাস্টম ইনপুট ও উদাহরণ

নির্দিষ্ট কোনো গ্রেগরিয়ান তারিখের বাংলা তারিখ জানতে module থেকে helper function ব্যবহার করুন। উদাহরণ — পহেলা বৈশাখ (১৫ এপ্রিল ২০২৬):

from datetime import date

from bangla_date import english_to_bangla_digits, gregorian_to_bangla_date

# পহেলা বৈশাখ ১৪৩৩
gregorian_date = date(2026, 4, 15)
bangla_day, bangla_month, bangla_year, bangla_season = gregorian_to_bangla_date(gregorian_date)

print(
    f"{english_to_bangla_digits(bangla_day)} {bangla_month}, "
    f"{english_to_bangla_digits(bangla_year)} বঙ্গাব্দ — ঋতু: {bangla_season}"
)

আউটপুট:

১ বৈশাখ, ১৪৩৩ বঙ্গাব্দ — ঋতু: গ্রীষ্ম

সরাসরি প্রস্তুত আউটপুট চাইলে format_bangla_date ব্যবহার করুন:

from datetime import date

from bangla_date import format_bangla_date

print(format_bangla_date(date(2026, 4, 15)))

public API-তে বাংলা-নামক ফাংশন এবং ইংরেজি alias — দুটোই আছে:

from bangla_date import gregorian_to_bangla_date, english_to_bangla_digits
from bangla_date import গ্রেগরিয়ান_থেকে_বাংলা_তারিখ, ইংরেজি_থেকে_বাংলা_সংখ্যা

টেস্ট

uv run pytest

uv ছাড়া standard library runner দিয়েও চালানো যায়:

python3 -m unittest discover -s tests

অবদান

যদি আপনি এই প্রকল্পে অবদান রাখতে চান, অনুগ্রহ করে একটি পুল রিকোয়েস্ট জমা দিন বা ইস্যু তৈরি করুন।

সূত্র ও উৎস (Formulas and provenance)

ইঞ্জিনে ব্যবহৃত জ্যোতির্বিজ্ঞান সূত্র, ধ্রুবক এবং তাদের সূত্রনির্দেশ, এবং টেস্ট রেফারেন্স ডেটা পুনরুৎপাদনের পদ্ধতি ও কমান্ড — সবই FORMULAS.md-এ নথিবদ্ধ।

সংক্ষেপে: ইঞ্জিনটি এই প্রকল্পের নির্বাচিত নিয়ম (কলকাতার সূর্যোদয়ের সময় সূর্যের সায়ন রাশি), Meeus/NOAA সৌর দ্রাঘিমা সিরিজ, এবং লাহিড়ী অয়নাংশের একটি রৈখিক আসন্ন মান ব্যবহার করে।

লাইসেন্স

এই প্রকল্পটি MIT লাইসেন্স এর অধীনে প্রকাশিত।

Metadata

Release files for bangla-date 2.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bangla-date 2.0.3
File Size Uploaded Provenance
bangla_date-2.0.3.tar.gz 15.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bangla-date 2.0.3
File Interpreter ABI Platform
bangla_date-2.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 23.6 kB

Release files / bangla_date-2.0.3.tar.gz

Download URL bangla_date-2.0.3.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fd8dc5909ece7b8ea181bb09ab5f8fb8adddc02f152302393685c72889462b5e
BLAKE2b-256 checksum
How to use checksums
583606a9b73a178159504161142067d4531ecec945876012026c21c2019c573c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / bangla_date-2.0.3-py3-none-any.whl

Download URL bangla_date-2.0.3-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c82827d17edbba71e145b8dc6bcbf2ddba8c9e02093e7f8ffc7cc47f110f045a
BLAKE2b-256 checksum
How to use checksums
cfd10e5bd106d523c5ede3cc80ff29e97c7d6ed81c258319fe864541fc65a16c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Security for bangla-date 2.0.3

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bangla_date-2.0.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

2.0.3 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page