easedate
Description
A python package for easy date use and conversions.
Install
pip install easedate
Currently Available functions
today()
parse(str_date)
str_to_date(str_date, input_format, output_format)
weekday(date, output_format)
add_day(date, value)
add_month(date, value)
add_year(date, value)
diff_in_days(date, base_date)
diff_in_months(date, base_date)
diff_in_years(date, base_date)
is_after(date, base_date)
is_before(date, base_date)
is_equal(date, base_date)
Usage example
from easedate.easedate import *
result = str_to_date("22/03/2020", input_format="%d/%m/%Y")
print(result)
# 2020-03-22
result = parse("01/03/2020")
print(result)
# 2020-03-01
result = weekday("22/03/2020")
print(result)
# Sunday
result = weekday("22/03/2020", output_format="%a")
print(result)
# 0 (Sunday is indexed as 0 and Saturday is indexed as 6)
result = add_day("22/03/2020", value=1)
print(result)
# 2020-03-23
result = add_day("22/03/2020", value=-1)
print(result)
# 2020-03-21
result = add_month("22/03/2020", value=1)
print(result)
# 2020-04-23
PyPi
Author
License
Metadata
Release files for easedate 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| easedate-0.0.3.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| easedate-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / easedate-0.0.3.tar.gz
| Download URL | easedate-0.0.3.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25dbc1d681e11593c7429e312c181155be169853d233815b6cfe78fb492ad8cb
|
|
BLAKE2b-256 checksum How to use checksums |
9722878f6b9068a057b318f30356e9f719eafe3601cc3c7b88d5fdfc2920f4e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.3
|
Release files / easedate-0.0.3-py3-none-any.whl
| Download URL | easedate-0.0.3-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
89988fb02b71ceb26ee22401b9e624cec326ba92fa73cc9e3b529c8748f3f3cc
|
|
BLAKE2b-256 checksum How to use checksums |
93f25f41f04b2d5200a3d0f7caf41c7afc1c7483f1152fba442e49977a6f0d1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.3
|