Metadata-Version: 2.1
Name: date-assistant
Version: 0.5.5
Summary: 🗓 Classes and functions with intuitive names for common dates operations
Home-page: https://github.com/jalvaradosegura/date_assistant
License: MIT
Author: Jorge Alvarado
Author-email: alvaradosegurajorge@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
Project-URL: Repository, https://github.com/jalvaradosegura/date_assistant
Description-Content-Type: text/markdown

# Date Assistant

## Usage

### Get the difference of days, months or years between 2 dates
```py
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
my_birthday_2021.years_diff_with(date_assistant_birthday)
# 0
```

### Get the amount of years or months started since or until some date
```py
from date_assistant import DateAssistant

last_day_of_2021 = DateAssistant('2021-12-31')
first_day_of_2022 = '2022-01-01'
first_day_of_2023 = '2023-01-01'
date_assistant_birthday = '2021-08-18'

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
```

