Skip to main content

datetime module that operates on B.S

Project description

Nepali Datetime (Bikram Sambat B.S)

The package similar to Python core datetime package that operates on Bikram Sambat (B.S) date instead of A.D.

Installation

$ pip install nepali-datetime

Usage

The Python3 core datetime library usage.

# Get current datetime in AD format
>>> import datetime
>>> datetime.datetime.now()
# 2020-07-18 12:18:53.586455
>>> datetime.date.today()
# 2020-07-18

The equivalent nepali_datetime library usage.

# Get current datetime in BS format
>>> import nepali_datetime
>>> nepali_datetime.datetime.now()
# 2077-04-03 12:18:53.586455
>>> nepali_datetime.date.today()
# 2077-04-03

The equivalence is not limited to just getting current datetime. Its supports almost methods from Python's core datetime library supports & is almost equivalent. The ultimate goal is not make it equivalent & making these two library's interchangeable at any line of code.

Documentation

Complete documentations can be found here.

Contribution

For contribution check the guidelines in CONTRIBUTING.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nepali-datetime-1.0.1.tar.gz (14.2 kB view hashes)

Uploaded Source

Built Distribution

nepali_datetime-1.0.1-py3-none-any.whl (15.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page