datetime module that operates on bikram sambat & nepal time
Project description
Nepali Datetime (Bikram Sambat B.S & Nepal Time NPT)
The package similar to Python's core datetime package that
operates on Bikram Sambat (B.S) date & Nepal Time +05:45.
Installation
$ pip install nepali-datetime
Usage
The Python3 core datetime library usage VS nepali_datetime usage.
# importing the module
>>> import datetime
>>> import nepali_datetime
# getting today's date
>>> datetime.date.today()
>>> nepali_datetime.date.today()
# getting now datetime
>>> datetime.datetime.now()
>>> nepali_datetime.datetime.now()
# creating date object
>>> datetime.date(2020, 9, 4)
>>> nepali_datetime.date(2077, 5, 19)
# creating datetime object
>>> datetime.datetime(2020, 9, 4, 8, 26, 10, 123456)
>>> nepali_datetime.datetime(2077, 5, 19, 8, 26, 10, 123456)
# date/datetime formatting
>>> datetime.datetime(2020, 9, 4, 8, 26, 10, 123456).strftime("%d %B %Y") # 04 September 2020
>>> nepali_datetime.datetime(2077, 5, 19, 8, 26, 10, 123456).strftime("%d %B %Y") # 19 Bhadau 2077
*Note: The equivalence is not limited to just getting current datetime. Its supports most of the methods from Python's core datetime library. Check documentation for more details.
Documentation
Complete documentations can be found here.
Contribution
For contribution check the guidelines in CONTRIBUTING.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nepali-datetime-1.0.3.tar.gz.
File metadata
- Download URL: nepali-datetime-1.0.3.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.5.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad791995307a3a48b466d9491156dcdbc8f2cbc4bc8f8ff95afbf3b41915a091
|
|
| MD5 |
1f01dc39859ccf13fa2a0b82d5ab052a
|
|
| BLAKE2b-256 |
f4294373ea1c09db6468d10bad07308a9e2c589e67b3ecf58a543e7f87c35e41
|
File details
Details for the file nepali_datetime-1.0.3-py3-none-any.whl.
File metadata
- Download URL: nepali_datetime-1.0.3-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.5.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62a5838a663d00a86613fe06236ddd240fb91ac066cd154454692efedebb1551
|
|
| MD5 |
4694f00a82846380cd78389bac15a1f9
|
|
| BLAKE2b-256 |
80af9eec3d3c1b58fd05df0285bb42f0ddafd6204ee0c44098c28623fa4ff986
|