No project description provided
Project description
Date Assistant
Usage
Get the difference of days, months or years between 2 dates
from date_assistant import DateAssistant
my_birthday_2021 = DateAssistant('2021-07-13')
date_assistant_birthday = '2021-08-18'
my_birthday_2021.days_diff_with(date_assistant_birthday)
# 36
my_birthday_2021.months_diff_with(date_assistant_birthday)
# 1
Get the amount of years or months started since or until some date
from date_assistant import DateAssistant
date_assistant_birthday = '2021-08-18'
last_day_of_2021 = DateAssistant('2021-12-31')
first_day_of_2022 = '2022-01-01'
first_day_of_2023 = '2023-01-01'
last_day_of_2021.years_started_until(first_day_of_2022)
# 1
last_day_of_2021.years_started_until(first_day_of_2023)
# 2
last_day_of_2021.months_started_until(first_day_of_2022)
# 1
last_day_of_2021.months_started_since(date_assistant_birthday)
# 4
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
date_assistant-0.5.3.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for date_assistant-0.5.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9b2f5cbb833404529bc6c83b0cb0e60ff6d7344ffdd9da72836fde77a70c57a |
|
MD5 | 7684a5140fdf7a2b3827b8d8174a1262 |
|
BLAKE2b-256 | 7489fec2151b86dfc901862a11b657d7d2819d2fe5b6ffb7c5d60cffb01d3c9f |