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

Uploaded CPython 3.14Windows x86-64

npdatetime-0.2.8-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.8-cp314-cp314-macosx_11_0_arm64.whl (251.6 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

npdatetime-0.2.8-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.8-cp313-cp313-macosx_11_0_arm64.whl (251.6 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

npdatetime-0.2.8-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.8-cp312-cp312-macosx_11_0_arm64.whl (251.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

npdatetime-0.2.8-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.8-cp311-cp311-macosx_11_0_arm64.whl (251.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

npdatetime-0.2.8-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.8-cp310-cp310-macosx_11_0_arm64.whl (253.7 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

npdatetime-0.2.8-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.8-cp39-cp39-macosx_11_0_arm64.whl (255.3 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.8Windows x86-64

npdatetime-0.2.8-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.8-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.8-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: npdatetime-0.2.8-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.8-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 2ef1771d1c0a137c8e61008eefeb64a96843d44aa52f27d978c037f086d2abfe
MD5 d61cb4e77671307412df68dc13370286
BLAKE2b-256 31c63703abc65380b166cbec0aeae8f6bb947c91872dee8bed6dce4d830c9ed1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 37d0703fbad4593114b39e1fe75ffc4ef91ca0acb049a721f57cd96baf641360
MD5 1ef3771433122c46a904932c689d6828
BLAKE2b-256 c104cd0722425da7ea4d87c79d7cf08ee361b8204215d54c0ecfdfb256236d8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2cc95b670153be07c91d42816b964025c6cbd60207e3c1617e2e14921fbdc21d
MD5 e1756af57fc32e394a7243d3c13ed297
BLAKE2b-256 bac51bf886564e5f1f3c0140a4336d493a06321417289a2cd7c900ea59971408

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.8-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.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 273ee3559558e450ebe9af31e94fcaa1c6451840f61ed54b2e2a65740de9bc7f
MD5 c744a05bf726ad840cd11995428fd5b3
BLAKE2b-256 1ae16096c97aaf497fefee0fc6deedc745a0e00cee0c72883955d17f3e9cc0c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4bcf7d63336b19864289560704ff252a4489b7dd5650d2384a9860efb78027eb
MD5 e9bf6b01a296b999e45386afcf4abba7
BLAKE2b-256 c4c2ddb45be52c37ede49d26e880d2dfc4780d56c47e3237302d0a2947d3c8c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 037338edfca39b8fb908a3f6d56ca2d16162eeed3732f4d64391de8d8d365d3d
MD5 029d5b1af79f4559b5b0969e7e693aa9
BLAKE2b-256 f6428d89d06254f1a310b87f81415cb5b94e199b4a2b444da435542adc6686b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.8-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.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 24c4d1f42c17ae9cfae0c927e01d51a145a9ffafb276878d5f5d792b3da10276
MD5 5f6e36b784d1456520cabda85e7d050f
BLAKE2b-256 4c7ad154e306215a7ebc111b3b662817471d88695b5adae9f945ed25cf83dbbe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8277a2e51918097e07893b7aa33270c58249bdc87bcf45945f151846b2a11da0
MD5 9c62f4d7c547ad5ff975bb55e4ff5734
BLAKE2b-256 ff4ad844888656a29b9c92b7d78fe3593abf2c5def4c49f5119e4143173a5a7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 effefd7c7049c9f9c82239f5c271c6af86a1dfadf12ab2b5f7782c2967446fc4
MD5 c1c2aa21ffbbb415bf40549b7ce0bcd6
BLAKE2b-256 ec0e9bd73886862c02a257863b6fd0a5684e4b4a8a2b003dc12a850ac526b91f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.8-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.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d2e273afcb8d0984b34b68a6870ee98fd5a6ada309732283ec8c63219b5aa290
MD5 5a518a224225cca068269e64527110d5
BLAKE2b-256 579c33665673a04152fd27f7c92d5265ada856555d2100600dca4505fbde35f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e35042c0ca85f842670db2d8437580025674679ed79d5050e5c046af07f74484
MD5 ace2ddd9466583171df46c5e62d65294
BLAKE2b-256 b382183928d1075a9e23910e05e000b08df210a6d75388105a6b619facdbc352

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 84443998b28570ad3ab3e985f52cf8e4d4b43e73a3b3c4c07c878cfe4fdff640
MD5 4063697a9e5abc2e2935385b00af8242
BLAKE2b-256 5b36a33427a1d420af42fd833000bcb77b310b9a1f83afbff10daabe4ee59d1b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.8-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.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ccb82154ccc61a8c36609fca4613eac84d55a3af2788ddbb56eedacf50dd5e9c
MD5 cbf4c526fa79958825574a2b915871e6
BLAKE2b-256 e19c1d0f4d383e23def3f47f177e2a6169a715a0ec57f44c445d9627c0a88c10

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 53ccbf57c5092128b712da7caca10ce11447d9a09814dd40e3a7041a97178c85
MD5 70d4c4ce36fcd7db31c015ce69c71a9d
BLAKE2b-256 9e9367658f4f24a46414fef15f44001e9540dc004ea359b32ecc0cd281fbca14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ea140787502114113cb6aebd8551edb1750e7fab1029cbac5488a60bc88627f1
MD5 a8314e68da64be38788040e0a89e17fa
BLAKE2b-256 290dee7c02b7c7c9a13eb7af24b48bc97b35fe273c10734e8b0c1808560fc8c9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.8-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.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 dbf2116252b01d2af738c5308f575b25a5d0e6cbc9a96d610108d4a0e916279d
MD5 d0e083180f06dbd5c215190a6237f056
BLAKE2b-256 53fb3e7d4685d12e80daf9961ffe0aa6d4184a30f7387e1667e8967abac8b258

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2407367dd9048a7d75379680d85dadcdc97c1c6819ce0314148e5ec1c9b46b00
MD5 bc7e3694fe4bf59dbb26d11d7b2161da
BLAKE2b-256 44e733a29c6321b47661d97d6f8a5a2b7c8b74a993f5953eac5855880fabd63c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a7271748123d11063784a60cbf9982e142d8052aa4c0864ac738d76d117c0fc9
MD5 7ccd13be755f191cf3f71fedf5aae958
BLAKE2b-256 d46415f77c1072df5a18ee2fc84b0ce0279bc93830b3e1585a4aea1bb1cf4580

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.8-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.8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d2b56b75055137bde4eba597fcd1084b662a66ec0f5005974cb20ae319f94c8f
MD5 f9a1a2318b41729242cbe58c1f25aa84
BLAKE2b-256 749235023e44752cea1a009de9bee77d8b185ca2a97b39c1a0f1638575f28ea0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 cecb5208c16c9e7d64ba86217269cf946caa695c9bf9d4829bb0fa5fc6d3423d
MD5 70c44f074b7934871220659d727093a5
BLAKE2b-256 1cbfd26b6346f89f7e807de83967356e51ba5f7527594bbd25c2f223cd138477

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.8-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0fb254a866c24751059ff080b937902fe3bbe4dea148c67585ee95eb7b8d2fd1
MD5 5b3c4d31a0f5c6a6199dd4329ca205fc
BLAKE2b-256 ff5b89024e173ba7d7f861a769e13b6aa4a5c06886524a4a248c2940ebda045a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.10

21 files

0.2.9

21 files

This release

0.2.8 This release

21 files

0.2.7

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