Skip to main content

NPDateTime - Python

Fast Nepali (Bikram Sambat) datetime library for Python, powered by Rust.

Installation

pip install npdatetime
# or with uv
uv add npdatetime

Quick Start

from npdatetime import NepaliDate

# Create a Nepali date
date = NepaliDate(2077, 5, 19)
print(date)  # 2077-05-19

# Convert to Gregorian
year, month, day = date.to_gregorian()
print(f"{year}-{month:02d}-{day:02d}")  # 2020-09-04

# Create from Gregorian
date = NepaliDate.from_gregorian(2020, 9, 4)
print(date)  # 2077-05-19

# Get today's date
today = NepaliDate.today()
print(today)

# Format dates
formatted = date.format("%d %B %Y")
print(formatted)  # 19 Bhadra 2077

# Date arithmetic
future = date.add_days(30)
print(future)

Features

  • Blazing Fast: 100x faster than pure Python implementations
  • 🎯 Accurate: Verified against official BS calendar data (1975-2100)
  • 🔧 Simple API: Pythonic interface with full type hints
  • 🌍 Battle-tested: Rust core ensures reliability

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

npdatetime-0.2.7-cp314-cp314-win_amd64.whl (153.8 kB view details)

Uploaded CPython 3.14Windows x86-64

npdatetime-0.2.7-cp314-cp314-manylinux_2_34_x86_64.whl (289.7 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

npdatetime-0.2.7-cp314-cp314-macosx_11_0_arm64.whl (251.6 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

npdatetime-0.2.7-cp313-cp313-win_amd64.whl (153.8 kB view details)

Uploaded CPython 3.13Windows x86-64

npdatetime-0.2.7-cp313-cp313-manylinux_2_34_x86_64.whl (289.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

npdatetime-0.2.7-cp313-cp313-macosx_11_0_arm64.whl (251.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

npdatetime-0.2.7-cp312-cp312-win_amd64.whl (153.8 kB view details)

Uploaded CPython 3.12Windows x86-64

npdatetime-0.2.7-cp312-cp312-manylinux_2_34_x86_64.whl (289.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

npdatetime-0.2.7-cp312-cp312-macosx_11_0_arm64.whl (251.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

npdatetime-0.2.7-cp311-cp311-win_amd64.whl (153.5 kB view details)

Uploaded CPython 3.11Windows x86-64

npdatetime-0.2.7-cp311-cp311-manylinux_2_34_x86_64.whl (288.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

npdatetime-0.2.7-cp311-cp311-macosx_11_0_arm64.whl (251.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

npdatetime-0.2.7-cp310-cp310-win_amd64.whl (155.1 kB view details)

Uploaded CPython 3.10Windows x86-64

npdatetime-0.2.7-cp310-cp310-manylinux_2_34_x86_64.whl (291.3 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

npdatetime-0.2.7-cp310-cp310-macosx_11_0_arm64.whl (253.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

npdatetime-0.2.7-cp39-cp39-win_amd64.whl (157.2 kB view details)

Uploaded CPython 3.9Windows x86-64

npdatetime-0.2.7-cp39-cp39-manylinux_2_34_x86_64.whl (292.9 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

npdatetime-0.2.7-cp39-cp39-macosx_11_0_arm64.whl (255.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

npdatetime-0.2.7-cp38-cp38-win_amd64.whl (155.4 kB view details)

Uploaded CPython 3.8Windows x86-64

npdatetime-0.2.7-cp38-cp38-manylinux_2_34_x86_64.whl (292.5 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

npdatetime-0.2.7-cp38-cp38-macosx_11_0_arm64.whl (254.7 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

Details for the file npdatetime-0.2.7-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: npdatetime-0.2.7-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 153.8 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for npdatetime-0.2.7-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 0f4a25d6dd2cd86f6210912f12720110816ae04e9b3d040c6e5cdeb15953de27
MD5 cc628b28ad6e15655d488b4af7855344
BLAKE2b-256 a23394b15e3cd8f139913a5904444f31d17ab4590f4e747a230a3f63d8336be3

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f966aec19e8ab7b8969ad008248903265882ccda53100c5f8dfa354bfddfd505
MD5 87bd6a70803413577b91d9b99d9ee4c0
BLAKE2b-256 f15e1122ca89b122d7fb602c92f01229174ef72f468c1c97a4a80c579731d70b

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b34e29bd0103e3505461fae8d01e0363a31e35ba84f04e976bbf26fc9f01a6c7
MD5 d373e6e86fff3e0da06a4dc6d6a25afb
BLAKE2b-256 d74e17aa1c271f380ddc423b8556d57b4205acb96a36bdcd961c1903d6e3064b

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: npdatetime-0.2.7-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 153.8 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for npdatetime-0.2.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b8ca15df160d902c17ff322e3ab4c709a9828d69345d5c734bffc9481ee15f43
MD5 9e263dff9cd12a0015ed4ebaf58ce941
BLAKE2b-256 4c96f1875f6ca46903e77aa9c0a9897dcd596fa0010db0bfa74cdc28bfa5fda2

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3e752ef134816ab2f8edf03a0acbabe154442913c0343da2dcf9757be667a079
MD5 7bed30d49537e033801b5cf6b7aa02a2
BLAKE2b-256 f0c42f193549de284f13d90823013145637f3396f36d42fcf0e34f45b636e547

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c48541abf108e78fe910d6df6370a99eb1afdfda64008938b8be6044e79f052
MD5 e436d616581dbfd55818212a83a19f93
BLAKE2b-256 a539ce6a6a570351e367ca9352ae7e2284b5875674907fc8ced4998bc5ebf24e

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: npdatetime-0.2.7-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 153.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for npdatetime-0.2.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b2eba3aeb54dedfb177a2728df074e0e7569121d4074d76c89fd24922954e91a
MD5 d679f5c40561628932a048d0e3e8dbab
BLAKE2b-256 3db339d6f49f56e46bef551254ec13514f8348ca93f52578b619db83d9d320e3

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e227ee33a442ccc60563f5d94fb999ed07890f1391f3f82dad84c3d57fac6cbe
MD5 b5628fcb57404d75c233e8a34e958b15
BLAKE2b-256 0dbbaff4dd1b594329c2db9a9c9225828584a988351ef5853c86b3e07669fc04

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 79437f5a7ed756ef39274d902e028d994690faf8bcee3e91509f5d598c49d299
MD5 27ee3f8484fdbee172024df36ca91210
BLAKE2b-256 800ad325c315d439b157c5de2bb7f95ce430f49e4356f4c9787b36ba6df6f200

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: npdatetime-0.2.7-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 153.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for npdatetime-0.2.7-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1d1184b57d251cd6ff9ca5cbae8943a74a776591e7bb933a897aba5b1d0b92fe
MD5 acbeafc65976d3d202d34c5e3219f302
BLAKE2b-256 8ef05a9a0d30a14e3931d67c3967036e693dd4b667618f0c5783d05d53f67769

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ad7e03267e60e2c186e06edf2e6f0a9b4fe26d5abb24280616de27bc25313148
MD5 4905931d2747f7f7d0f5859097a65a9f
BLAKE2b-256 9e9ed74abfb8462cea3d6bacfe7b23b538d0d1dd2822d301f4bb743e14a5db90

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f82ed5ee4ec36eed8b0a1d0277938d2e7909a69a2f82ac7e18a710ff1f4d9b8d
MD5 e8b63e5b113023f30c4b0751d2349197
BLAKE2b-256 e3a39f0258b75a9aa7b2ef31a1de1e6d6102a0fafccc76c865d03bc61785172c

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: npdatetime-0.2.7-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 155.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for npdatetime-0.2.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b94e1a1c48335c6360ad27f43d24c1cf62c17ab39483989064eed80866ee5134
MD5 aa2146e5337dbb969026b7c55bf5b102
BLAKE2b-256 b5fad264b91222b22b852bf8119f70bbe0f2d00563358fe7fe15b3949d8651e2

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5d77fb638b8b75d8b84c259107227dd7e1a280b3f985c2ff0aec99ed325bffd3
MD5 bf995d0d3677f9d4143f08847fe8bddc
BLAKE2b-256 78d9e469db971fcee5a36094d226e333538e14478055b98013cb1f37fc145dd3

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d12661ec03492efc0c83a0a5c0d299b1ea681c33f510dedafb4a2cb18df68b3f
MD5 dd94b2c46fd26a87c7eb289eaa211605
BLAKE2b-256 4ece5b0a01380eed2c4207ce2f9be26588984bd606e929aaa1cba3e87784f86f

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: npdatetime-0.2.7-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 157.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for npdatetime-0.2.7-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 89c3f6fb856901e3f7c392e7c1244abd540f77de9ef6a63ffbe73ebe97c3a9bf
MD5 e5ec6eaa6f261ba7a2c574a82ba80003
BLAKE2b-256 80c4fecb6975ddd12d0c4a21d27340b2379f958f8b551b7dfe454f639de6d79e

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 23e6f62d5407df5d7f6b97f73bf3219af4693ff9c1db0a7cc7e3206ae0c2ed96
MD5 b8840d50e5a3208169c6c7335c996670
BLAKE2b-256 81dfc7af2b1c94492349fe26b181bca10f6aef287c24272b40006e82ad484c51

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a3b62b1c4415244bf354dfc5642b9c6a013912ceccb70ac842075c398d715397
MD5 92b3a02980ad913d304156b9a83a6295
BLAKE2b-256 2ef98d0e953dce61bd4ea683bb0535909aa3294248a751c4268e954130932483

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: npdatetime-0.2.7-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 155.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for npdatetime-0.2.7-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 5370c342050b726a0880f9d84162308867e36bba90e4e0438caa21ae89a88f63
MD5 ba203d00535e59e61c50100a0ff0a8d2
BLAKE2b-256 fac56221523f6698caa94cac9a1d644e1aef24fe6fd66bb68d0d5c27352fe20b

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp38-cp38-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b7e9607f9453ae29f7c2f72a7b0c7be6a5e78593b6cb6c0bdf238043fb543a8d
MD5 f5191450811d1118e11b7a311337f246
BLAKE2b-256 94522eff75bb7d77d8f0e5faf54f5e8680059916671c4a72df95bd4a3a60b1ef

See more details on using hashes here.

File details

Details for the file npdatetime-0.2.7-cp38-cp38-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for npdatetime-0.2.7-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b7486dd051dc8ce3db5e8abbaf755ffb5e641f41e7a4ef5498aa7e429303373f
MD5 1944c9e97bfd10f7c0e021cc1280737d
BLAKE2b-256 cb8580f5add2f21d983c5323f1515d756655724cc9760c3f6fe1f15087e21884

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.10

21 files

0.2.9

21 files

0.2.8

21 files

This release

0.2.7 This release

21 files

0.2.6

21 files

0.2.5

21 files

0.2.4

21 files

0.2.3

21 files

0.2.2

21 files

0.2.1

21 files

0.2.0

21 files

0.1.10

21 files

0.1.9

21 files

0.1.8

21 files

0.1.7

21 files

0.1.6

21 files

0.1.5

21 files

0.1.4

21 files

0.1.2.post2

2 files

0.1.1

2 files

0.1.0

21 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