Skip to main content

Bikram Sambat Calendar

Installation

pip install bscal     # or: pipx install bscal

bscal

$ bscal
     Poush 2080
Su Mo Tu We Th Fr Sa
 1  2  3  4  5  6  7
 8  9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29

Pass year for a year view, year month for a single month.

bsdate

$ bsdate                          # now
Tue Poush 17 09:14:14 +0545 2080

$ bsdate 2016-09-08               # AD date
Thu Bhadra 23 09:17:21 +0545 2073

$ bsdate 1473305798               # unix timestamp
Thu Bhadra 23 09:21:38 +0545 2073

$ bsdate -c 2073-05-23            # BS to AD
Thu Sep  8 09:19:00 +0545 2016

Flags: -I[FMT] for ISO 8601 (date|hours|minutes|seconds), +FORMAT for BS-aware strftime, -u for UTC.

Python

BSDate is a datetime.date for Bikram Sambat. Same constructors, accessors, arithmetic, ordering. strftime tokens are BS-aware.

from datetime import date
from bscal import BSDate, bs_to_ad, ad_to_bs

BSDate.today()
BSDate.fromisoformat("2081-01-01")
BSDate.from_ad(date(2024, 4, 13)).to_ad()

bs_to_ad(2081, 1, 1)         # (y, m, d) -> date
ad_to_bs(date(2024, 4, 13))  # date -> (y, m, d)

bscal.cal is the stdlib calendar for BS: isleap, leapdays, weekday, monthrange, month_name, month_abbr, and a BSCalendar (subclass of calendar.TextCalendar).

Metadata

Release files for bscal 0.0.8

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

Source distribution (sdist)

Source distribution for bscal 0.0.8
File Size Uploaded
bscal-0.0.8.tar.gz 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bscal 0.0.8
File Interpreter ABI Platform
bscal-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 28.1 kB

Release files / bscal-0.0.8.tar.gz

Download URL bscal-0.0.8.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
66bb75dbbf057196105ae199c04507d7fa9236ecbd27c1fd063fc62feef879af
BLAKE2b-256 checksum
How to use checksums
74fc156542b793271d6ea25d3087ed4056306c4edba92d79bed42550e462473b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 26, 2026.

Transparency log

Release files / bscal-0.0.8-py3-none-any.whl

Download URL bscal-0.0.8-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a515d0b506abdbbf12a7a3b009fedf58884683e23629b98071f742204c85509b
BLAKE2b-256 checksum
How to use checksums
7dbfaa2df06f5868ad4d3663cbf59e4e94d929f35793be443d618e5a76368d73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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