Skip to main content

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

easedate

Author

2020 brworkit.

License

MIT 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)

Source distribution for easedate 0.0.3
File Size Uploaded Provenance Actions
easedate-0.0.3.tar.gz 3.6 kB Without provenance Details for easedate-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for easedate 0.0.3
File Interpreter ABI Platform Actions
easedate-0.0.3-py3-none-any.whl Python 3 none any Details for easedate-0.0.3-py3-none-any.whl

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

Security for easedate 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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