Skip to main content

Fast Nepali (Bikram Sambat) datetime library

Project description

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

Project details


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.3-cp314-cp314-win_amd64.whl (148.1 kB view details)

Uploaded CPython 3.14Windows x86-64

npdatetime-0.2.3-cp314-cp314-manylinux_2_34_x86_64.whl (290.4 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

npdatetime-0.2.3-cp314-cp314-macosx_11_0_arm64.whl (248.8 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

npdatetime-0.2.3-cp313-cp313-win_amd64.whl (148.1 kB view details)

Uploaded CPython 3.13Windows x86-64

npdatetime-0.2.3-cp313-cp313-manylinux_2_34_x86_64.whl (290.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

npdatetime-0.2.3-cp313-cp313-macosx_11_0_arm64.whl (248.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

npdatetime-0.2.3-cp312-cp312-win_amd64.whl (148.1 kB view details)

Uploaded CPython 3.12Windows x86-64

npdatetime-0.2.3-cp312-cp312-manylinux_2_34_x86_64.whl (290.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

npdatetime-0.2.3-cp312-cp312-macosx_11_0_arm64.whl (248.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

npdatetime-0.2.3-cp311-cp311-win_amd64.whl (148.5 kB view details)

Uploaded CPython 3.11Windows x86-64

npdatetime-0.2.3-cp311-cp311-manylinux_2_34_x86_64.whl (291.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

npdatetime-0.2.3-cp311-cp311-macosx_11_0_arm64.whl (250.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

npdatetime-0.2.3-cp310-cp310-win_amd64.whl (150.6 kB view details)

Uploaded CPython 3.10Windows x86-64

npdatetime-0.2.3-cp310-cp310-manylinux_2_34_x86_64.whl (293.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

npdatetime-0.2.3-cp310-cp310-macosx_11_0_arm64.whl (253.3 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

npdatetime-0.2.3-cp39-cp39-win_amd64.whl (152.1 kB view details)

Uploaded CPython 3.9Windows x86-64

npdatetime-0.2.3-cp39-cp39-manylinux_2_34_x86_64.whl (294.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

npdatetime-0.2.3-cp39-cp39-macosx_11_0_arm64.whl (255.0 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

npdatetime-0.2.3-cp38-cp38-win_amd64.whl (151.7 kB view details)

Uploaded CPython 3.8Windows x86-64

npdatetime-0.2.3-cp38-cp38-manylinux_2_34_x86_64.whl (294.5 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

npdatetime-0.2.3-cp38-cp38-macosx_11_0_arm64.whl (254.4 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: npdatetime-0.2.3-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 148.1 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for npdatetime-0.2.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 7a77397b2c1425b9f5da10b93b46926925be0e852c3725c39d88cd769778dc53
MD5 36c56d0a8226562cf4d834ba68fa05b6
BLAKE2b-256 04aac3c9e3c8db7286f33c1b690ae5c3c741cb3d3e5c685e94d35193e63b9da7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 67c3b5819d15cef679b8200a7efd469f0cb692f1e59b52aa65e359d19079e1c7
MD5 d8464ac95868851b1ee1b0c27d5d2cca
BLAKE2b-256 fbde8dfbafe677efb8d98a7a4220fe5608635d3b7639aa57df566fe277da6933

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1e0bc9f7f2b67f85d1cc771a0007c8e9496f9adceea04905f53cee3d2f89c221
MD5 f1336986ef797e11fc375b2393243d26
BLAKE2b-256 6137cff14072bacf981b16b18de31ecdaeb3428148936c1002187a714d3cecf5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 148.1 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for npdatetime-0.2.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ea26aa1ac08054a0d2defb991771157b62f03448b47c9d42a93030321ec0e2e8
MD5 109669aa8ad906199d3f6df30c4591d0
BLAKE2b-256 0c03900a7a390fad4a806f78437667e55899a556a9cfe956f14d26d62136bff0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e9e668ccb078886dcbefd8dc96a9cee1524d810107aefcec155630923c08a4a6
MD5 3e452c738a57e3da6733237dd68d63ee
BLAKE2b-256 d9ff3f6c618d84b41a8b5eb10e38011796ba883539e40b40acfa76d115851b34

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0c9f1bcebc36c467d55e347ff60a802c2373329e55c464136ebbfd579713a7e
MD5 6862f1a2f4c9fe54eb34cf30ff1286b9
BLAKE2b-256 d233ef9be26cb037eb808a6b860ca65086d5dd1e1349d3ee44d6b28f973e9cb8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 148.1 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for npdatetime-0.2.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 12fb49c0ffb75fa3e7b690fb6948d51c668f6de963497a1080a517f145a4a980
MD5 c68f54dad098938fafb3ee12244cf0d0
BLAKE2b-256 9273e59cf81013306e6f43c1968d9b631456a003f6ced78b2693feeedbf87880

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 78728e2c41bf8f8f2f09614d1bc52e7bf0acac217c91aeb9cd3ffd3ccfa4d9d0
MD5 99d478b1b834d4f50d2572ed11f65472
BLAKE2b-256 6eb8febf6c03445cf285be53a65f417d7f2cbb16b042bd0e8bce218916497777

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3b69ef546b5567c41a9c5d7a9e0ed3aa447fab6bb80df82850e9a1493380ace
MD5 41bac8aa43fee093eb00b9fcd86155aa
BLAKE2b-256 be49aaf714861623a8952b3813043c49c04a3ffc48a657b176bccd713735133c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 148.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for npdatetime-0.2.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 679782450cd3497d32c65631a31ae73ae9195d6f79f2c9168c4f4205419c6995
MD5 aa792b107a73f6b4a6bcad9ccf47355d
BLAKE2b-256 3008a79a7c4c7cf8920167aca64dab8f839d031f27fb316e1cbb41a259b21c36

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 837cce87a00cc3faf46d7660b7d06cbefef169cc5d06d4f7165c15ff7d4431f6
MD5 3d8b6e3357908dfd98d05cf18e85ebc8
BLAKE2b-256 793d4d337c47f4b4ca8944d7f5700e59378650532b542a6399fe6e8f7ba8acd8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ec5f250981b22974c08bc3cbe0543e907a88b2a718b79f757c53bad1282ade47
MD5 f58892f83a268dc48e2cac4cec408c0b
BLAKE2b-256 6bb86091b288d7011c4ecfbd2791bf7beea66e2940b710b9657a5d4c2bb61da9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 150.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for npdatetime-0.2.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 74c97d300276ec48e364e33bfeb59628c2d8b395b9a616fb60492f3eff3e9bdf
MD5 bee5a2633a86cad4fb5dc8735dd08619
BLAKE2b-256 c60cd4486d79cf431e1e87343ab113e76d99efc98ccf891ef4d4a4bcb7111b20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b506051d340f967b8cf8f4b49ed342bc369cf09116dbf61a6ebd6e3e0355d8bd
MD5 6c87b3953652465a3712ad42d357cfc3
BLAKE2b-256 18dea89f94275b4ab1232de8a17423717936a99a83189b931e6f8a1bd9ce3461

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3388d70f7eb3cba0ea3db18604e034ec0b970259a4a8089c79fc2005a9ac223
MD5 348a0bf57243381932be0e9e8fe7999a
BLAKE2b-256 003d77601a307c5f3824edb11ef30c6ca0d3c1c4f30619433ad6815941aed303

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 152.1 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for npdatetime-0.2.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 70d6fd9acc52d237fbe0a70099aa648032da86cc5fd51ffe358108e2211eeb78
MD5 2044879b35000af8d837bf8031f46385
BLAKE2b-256 a6537eb6d0c748f06abdddc410156ba3b33d0abe59675c9a3009adcbbce18afd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4bc74da2042ef28ca16cce1dd8a2f9f42fee47d2f47bc0603662c847b5ad68eb
MD5 417f166866e4a18876be53a148303ded
BLAKE2b-256 dcea0563b515fb453f01cf385d6f20bf40ff7e294ffb311c314a45ce32a49f68

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e7831d1ca8dc1618e63ca6b356aff03c65be039a7c2a64e0e10deb256dd357cc
MD5 ad529621ce7527263e69e6e0ce6e72c3
BLAKE2b-256 5ec9f38261e9c4075b1f6cae350d1eb5643e839135fd8fed35f7a5221cedac2c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 151.7 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for npdatetime-0.2.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 92bb709c53289776138a182c1439b37a4209b9a509f1ec1556d40d5c014457b4
MD5 99c29126f4f4f90b55dfeb4f274e2244
BLAKE2b-256 14623191e8b994414fc0cf21131ef5ba6c24ee31131a02c6b4f4b7cd237412db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6958383be55de2316de7d879f553f7ec57f7b3d53eaf67f9cd712449e7218fc4
MD5 ac21bcab7daf96793ecb94062142f156
BLAKE2b-256 8c5549401e206faaa2bab1792d35248a4e02ae961adad0d8f891ed46a08cb94c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.3-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 76e28f847e0959402aa751688a18f91b3c7493a0106fc939809003767060e222
MD5 520a2641d633f1c5a0c5c20dacc7a880
BLAKE2b-256 403e41540f32fa0c529c0206932d470107a3d3a68be6acb906a52a035d41b63a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page