Python BS date conversion utility
Project description
pyBSDate
Python implementation of Date conversion From Bikram Sambat(BS) to English Date(AD) and viceversa. Conversion is done with the help of date mappings so conversion limited to certain range of date.
Tested with python 2.7 and should be ok with python 3
Installation Instruction
- Get a copy of the project. Download zip of the project or clone this repo:
git clone https://github.com/SushilShrestha/pyBSDate
- Open your terminal, navigate to the project folder and type
python setup.py install
OR
If you have pip installed, simply
pip install pyBSDate
Usage
# Convert BS Date to AD
from pyBSDate import convert_BS_to_AD
adDate = convert_BS_to_AD(2072, 1, 10)
print adDate
# Convert AD Date to BS
from pyBSDate import convert_AD_to_BS
bsDate = convert_AD_to_BS(2015, 4, 23)
print bsDate
Date mapping data taken from https://github.com/bahadurbaniya/Date-Converter-Bikram-Sambat-to-English-Date
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
pyBSDate-0.3.0rc1.tar.gz
(7.0 kB
view details)
Built Distribution
File details
Details for the file pyBSDate-0.3.0rc1.tar.gz
.
File metadata
- Download URL: pyBSDate-0.3.0rc1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1beaa1c88c71873bc495b6e8d7e84a63d41fdeb4f97c1cb2484767392cf54d78 |
|
MD5 | 7b28f6f8283928df6166b00ed859f8fd |
|
BLAKE2b-256 | c2b2a7121a4f9460c89dcda1592544b55f7431b646ee37eca5f0ebf3169f9b9f |
File details
Details for the file pyBSDate-0.3.0rc1-py2-none-any.whl
.
File metadata
- Download URL: pyBSDate-0.3.0rc1-py2-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 838643f9afb4512b2b181ee6dee5d2addd90551e390f15941885530107084694 |
|
MD5 | 162a0009ccf83410d433bdc0cf8787d6 |
|
BLAKE2b-256 | 0bed97727ea18d2219f51e95e056f803a1cc7768b6a9697812fdde43fd839dea |