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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

npdatetime-0.2.9-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.9-cp311-cp311-macosx_11_0_arm64.whl (251.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

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

Uploaded CPython 3.9Windows x86-64

npdatetime-0.2.9-cp39-cp39-manylinux_2_34_x86_64.whl (292.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

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

Uploaded CPython 3.9macOS 11.0+ ARM64

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

Uploaded CPython 3.8Windows x86-64

npdatetime-0.2.9-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.9-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.9-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: npdatetime-0.2.9-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.9-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 8c91324c5f002400e20162ca7355e825960c8047e31703ab544ad788f0a7a13a
MD5 86e9ca1353bff53abc24cf2c07307fea
BLAKE2b-256 6c2de57a854ad34df74665fa845bf2714826990c8bfd42aa97c697f0228e7b60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1235b3d511da84a9c5d6fef6fca65f6af68acfdc533a4fdc3e953ed1c2d94acc
MD5 1a6e860186ec41dcc8ed73f507a4b960
BLAKE2b-256 3b1ad3bcffc680e6af741e6893149f6d22b9ebdbcb00e142e8b242d2f111958c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef27e89f50848e9698a9fdf52815c4d9182a1ef8b65bef0be065df6c72000deb
MD5 56af93d96fea5b5202e707c7b2ed1cc6
BLAKE2b-256 11243ebe7c77d585fafc61d8d7423976a887f89007368066799f1ee4beff6bf3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.9-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.9-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 57ffbf4b43bd8c0e5dbd3263248bc41119e03eddf8a4976f731965f990754485
MD5 d351ab15d67b91250a10040b53185616
BLAKE2b-256 4f93354a4fc29956da128910d59e397e23f39f41b5ab5c900a87be22310615c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5e61f65cefb50462cd4189ca41bad8b9535db4d4d6ecd252aacd2b5322a49808
MD5 1fe046012ca291002dda6fbbb9b45ef7
BLAKE2b-256 7b11b3ee22367d7ef2a83cac8832f3182d0804648646f3b3796a4771febffb96

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 51f97b3d8d0ccd3f6be1346aed9603285be441dd44b810527e8923cfe6890779
MD5 29cc70faa9c6f736621efd83e4acd2c3
BLAKE2b-256 6e6cdaad176424b0995854a13c983b4ad6d3c60f3424ec0ce9c045cafe3e290f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.9-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.9-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b65d84184ee6b56a41f73aece165e1ad53b5a9e2bd84958935035a9bb56a9e24
MD5 6a0f7ca617949b68c21fd54369a0bf54
BLAKE2b-256 0feeda744baca607821ab7f25e8f0f7ba47dd1433346b920e17a16d12cbae851

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c54dd35ec66ffe105c9360582d899de0352b52ad55669fe5f9903a97fdade7f9
MD5 6bd3637ca3dce4e68ec7f87d6ab7e315
BLAKE2b-256 56320c84a5602e2656ea513179d6e59f063c7fee73123634b56eba6198458bf5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 16b5e754d1255f10e1e2d430a7c05647862edfcefbe7c272c781779de3933644
MD5 0de4150bbe62027631ed6802139b4920
BLAKE2b-256 8d38f9586c59c802b2c2e6f2634e48f56a859ef8910506c29c71cc76f8f398cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.9-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.9-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 3249bbf187f75b389f14f19b78c8f26a7a5efc6ec6a523fe48413c89f072b829
MD5 782eb1a71513c396c5bfc80645cf2407
BLAKE2b-256 879b071d57327b8885e41264146e562af8aaac99ea5741d571247233d72a2e2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 30fd156f3eac58c1f371062a0224518120437f56d85faf18c2bb4bf405338dd6
MD5 c9c9dc0c7971263ef525636748430266
BLAKE2b-256 ed204fedc68c9de7a3fd96d3c5b5276bc6478a5e315b9c79da55b3feb2d60cb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 538842364881ab7844f46d1967405e122f5d0220b3b08aed992b3942574f9926
MD5 84a5b3631a027ffc5449474d1fa559b7
BLAKE2b-256 540267f7d0a1b8e08f6070a5d8c04fc60795ffb57e61155f9b4501d4f345c2c5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.9-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.9-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c2e307b7c7ffeff13defd8f6c9cc5a1d957146dee37197385fcb9e832c6326b0
MD5 72f75520abb6350b3378e2d890a39de6
BLAKE2b-256 0a9970b2849873ad3c2a5dda3dd02fc1b9ca07e08984a75f4003754ed835972b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b170efbd1028f4f2cca1651ea46468ddc39dc5a6e59922837af8f0e72070e36c
MD5 4633f8e5939ab5aca155d915b2e602ac
BLAKE2b-256 259c7d550ff3f5dc65f6473b727a1dc77340c472f1e3adff52d3ae131586c0b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 96b11bd88e85438a0248265516a307b1496f3da78caa265422992df5340a9644
MD5 2cec2a4f54615a34ed1c5d95f0b3738c
BLAKE2b-256 e61ad5a7db85d9bba29a5ed9bccf118875844d9774957bc50da0603e15b70396

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.9-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.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a349719b075040b87bc5dca05f6df9416050e1ab61453949db18d977bd6ce712
MD5 2320620b8edbf594621f4559bf5c4a5e
BLAKE2b-256 c6526883d5955661cb2fa7672df4c75bf453b9463190c3fa58c2e3ac9e99d471

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 eb7a2da3151cd95476cde4d183f193764aecfe5c8533fd433cb33d9f158e490c
MD5 d1c99bbe5da592d2b6aa85adcb6d32a5
BLAKE2b-256 14c974f0c77eb4a0587bec27404e4bf3a466ecd549c194972363913142af6f54

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 59c876d7cdcbdf9f21e10623c6379de9ea2c47ec3a97a0ca55776f0e9815ca6e
MD5 33623340ed6df23031a08954670b67df
BLAKE2b-256 b951a8eb57a51397a704961bd1f484475b31c14f56c29946a6750ce13bf3da63

See more details on using hashes here.

File details

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

File metadata

  • Download URL: npdatetime-0.2.9-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.9-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 21f9d39ebb03ac70161743f6120f4e7460f6c9dde89770350ae667e4ccf85635
MD5 021c3e214a9d5d7aedc657150df894c5
BLAKE2b-256 b0d5e0dd2b5bf8a18d42f8ee107e3e25be639dbfc969d366a4a251a1ee4a9ba8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f807491498dea686d2f5959a978a64b8558b796d67de4785b03fa4ce1877d5ab
MD5 dfd36981e87ec8a1687eaf7717dc394f
BLAKE2b-256 ea57eaaa195c4d56af65ba7b5785bf12aef1fb5ac5048e163eaa4acbd050864a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for npdatetime-0.2.9-cp38-cp38-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fe62b945691fbd96e92fd7d176f34e157ac58671ab151319d30f0181d907912b
MD5 9d0017fd5ce9e49b83a554dffd42f543
BLAKE2b-256 676e2b15e0295cb0138fb313cc8c04450b66f75ed7a98e6339ecf48a21bdf46b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.10

21 files

This release

0.2.9 This release

21 files

0.2.8

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