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

Uploaded CPython 3.14Windows x86-64

npdatetime-0.2.4-cp314-cp314-manylinux_2_34_x86_64.whl (290.5 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

npdatetime-0.2.4-cp313-cp313-manylinux_2_34_x86_64.whl (290.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

npdatetime-0.2.4-cp312-cp312-manylinux_2_34_x86_64.whl (290.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

npdatetime-0.2.4-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.4-cp311-cp311-macosx_11_0_arm64.whl (250.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

npdatetime-0.2.4-cp310-cp310-win_amd64.whl (150.7 kB view details)

Uploaded CPython 3.10Windows x86-64

npdatetime-0.2.4-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.4-cp310-cp310-macosx_11_0_arm64.whl (253.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

npdatetime-0.2.4-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.4-cp39-cp39-macosx_11_0_arm64.whl (255.1 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

npdatetime-0.2.4-cp38-cp38-win_amd64.whl (151.6 kB view details)

Uploaded CPython 3.8Windows x86-64

npdatetime-0.2.4-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.4-cp38-cp38-macosx_11_0_arm64.whl (254.5 kB view details)

Uploaded CPython 3.8macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: npdatetime-0.2.4-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.4-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 cc31b5b0671a9466e9b949860db1775b177846c464a917469c913ffe871ace56
MD5 0577c0003e23e8a37118133984ec46cb
BLAKE2b-256 96e90cd2fc1cf418c97e248afba2722a043deb6a927a8aedec78e1732b0cf52e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f34f831f75f439cb7794d8d31d2cc80e83e0e57a7a9845b9951eb1e719fe9354
MD5 505c41241147a89e2413ef826f13fbcc
BLAKE2b-256 ce6ce0162dc2418975191a7b2b701ab1166f30931378a36a7b6ad62993417669

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8a080b37740374cbac658a6284c73a9f16a75c705e2d5f8fbef168ab9c6a6018
MD5 750e5562f3c009ab5e0f0739eab13c21
BLAKE2b-256 5b13767910bc3cdf7b1fbba6d76f0e689fa4c8ffff44e5fdf6848b291a216c9d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.4-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.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 39c63cc166e3b40a811194ef3b49c1e7079b8b8a16135ef94322aa0ae0666819
MD5 f2e5bd18875dbc4d25ae54ded12af34a
BLAKE2b-256 11fd3d699096c7783f8cd64d125c0afce574d557f27d04ae30565710e4ecb759

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 79d24c2ac6ef43623569efaa35593005bf6a165a815bcf3139e577f3e2b7d6e6
MD5 75a220f1fea94c5ae8ec6760b33530c9
BLAKE2b-256 828cd23487e8491ed8e97fbabb2fb091249ee28476b57a61110c0a4d16b3ed88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b549f98e6a9392e47e3d02a43fcd80fcd7d3721773c514003471df5bd246e2b3
MD5 375d4ef10c1c683833826369984e9207
BLAKE2b-256 2bef3b37e9dcaedd3a86e107410720e1aeecdbe31f6e2b1cad2ad10027e7c428

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.4-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.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e7365cdb6632b95cde5d1c4026fb112b2a96a863b368ccd4eada6d355db20c6f
MD5 e2b60f5af08a0c9f6b8015a6677e768a
BLAKE2b-256 b42c522ee7f631a26bf25f55b2214ae7920c976dee531f9f0339ddf040187946

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 692bbc02fdd3661e172a791bd4cc28bf16f6b6ff829364a680c9408d014df162
MD5 512aec6ac23d3d01aad1bb26a3a8bc48
BLAKE2b-256 372485d34504f08a5709b72262852270efa1426c1b1c27e770f558f17bd6dc26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b484015b8fe32fa7723c889ae4813f66e565b9e9991476b5cfb7ce48c8526703
MD5 68baa76ec8baf199a2b0f90c5599b95b
BLAKE2b-256 26f80ce950aa7f270fd454dddfa31c019427bc604f6861a3a3eaa8588a99b0f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.4-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.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 64c83dbf7554216ccbb58a26e6cd7d254a7c17af0ca6cbe119ba01888710208e
MD5 c81263013ae44a56f0399a639ac34b8a
BLAKE2b-256 511b8b3ec5f9c253ec4c62d1b39d2e7202688b2fefd8a7fcc9e3b8bf49c1c0e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6cc5616469793813281ea2f6bb9c1e26a1495d91da1a0f28d3a7ceef664dac22
MD5 d51d2c0154ecdcb281d244563820e710
BLAKE2b-256 c527a4399882c645e6848e9ee444d839efd8dffdb7e398b0d8bd34a5508c59e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 18a2933050439fd5c7b11e99b6dab51368cdde9c1bd1a1fc93a5394774caf893
MD5 d5670ea8bd346ce0738ea077140623a6
BLAKE2b-256 bf849c1a8159d3980326f7651b7853d2665157d05b889de68a626fe1d67aa6fd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 150.7 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.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4a646504603584a978214e298eb70a0931145d4bd43a222b594357186e149f46
MD5 0a378de4ba38e627eb97c05c61bef88d
BLAKE2b-256 093d2e7b644615a5c44473daa6757a6b4a9f6559de9dada9f45e9e4f044c6f32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f46ba2efe1060d33f14ac233ca015716c350a45daa425ebf33087b6ca5f8866c
MD5 8c4c5a428b0ea3f6532fd0e6c4965c1a
BLAKE2b-256 d9459728e4dead2cea0822b3b5dfbdd2a9be76f64edfe305b700265f46bfa57d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f1833b949344dd10c0f22d021e2d1b5951e47a4295375827d4f0d87e539d4f7
MD5 f484b7b5ff3f38b3a9b129714b2c103e
BLAKE2b-256 f80028796fb836fdd40b7fd8a1f874d515ca6fe8a4728af4a565ad487ded1cb6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.4-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.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ed215ba849f5cc1e1fee539e86dc068b417d10226ad1128d8eacda628553e91b
MD5 ef9277ee302814c495d7f161069c12be
BLAKE2b-256 79b181273fe21c58cc8401b2b0c5825b962d0091e6578c8e6ef09641e09bbac6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b531298a0c30e5dd14759093dca49455f7851e12cb9fecee91ca73e023b059bf
MD5 6f0c755c1ba999d64422cf86067935d8
BLAKE2b-256 8328c41346c220d30042b1b776b113e4c3b6a3a77a3448ae68b8cf5b2dcf6aae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 15019f4cff487660a1ac6f2ef62459ed19abdeddbc76fb50213f4c472e572303
MD5 a014d51fd36e2e8434d31a45e6c28829
BLAKE2b-256 981dea3c4f4b855bbeb5c020e50e4a9270c888359a8422a8dbd10f344a43a12d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.4-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 151.6 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.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 a9302586fec45b4ae2b281a79cc5cf62f8e23cbdcade144cbfe9fd3424876b22
MD5 698952cde702c29d22e54e25ccb6a8f0
BLAKE2b-256 c7ddd766e5b4ce17826d570307ae39c1aacd88663b0cba5f2445a8ec5345ffda

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8a74b605d3b0c4104c35a7c20f06829906e66afcdb8708a1b9bddcf101042b7b
MD5 341805f206600be615d53cc4d100ffa0
BLAKE2b-256 70ebec4283ad5636afa9e585d9e3d3f50bc2e4c72f18a85a99a54d8b4ec65721

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.4-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fa283fc7a274e9f3be4f7c5278490dc2ec17c1bddbfc14761e2216ba3a3e8d9a
MD5 3e2dcfe7c8ceb71e3b3e4ed7fe1ed64c
BLAKE2b-256 95e68223ca8ace83f2e7909458dc896cd186ac73be48cbe14e7c8f9e724748b4

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