Neste modulo são disponibilizadas funções de calendários.
Project description
DateWeek
DateWeek is a Python package for working with w-sat weeks.
Usage
from dateweek import DateWeek
from datetime import datetime
# Creating a DateWeek object for the current week
current_week = DateWeek.current_week()
# Creating a DateWeek object for a specific week
week = DateWeek(2020, 1)
# Creating a DateWeek object from a datetime
week = DateWeek.from_datetime(datetime(2020, 1, 1))
# Creating a DateWeek object from a string
week = DateWeek.from_str("2020-01-01")
# Getting the first day and last day of the week
first_day, last_day = week.first_day, week.last_day
# Finding the previous week
previous_week = current_week - 1
# Finding the next week
next_week = current_week + 1
Development
Conda
conda env create -f environment.yml
conda activate dateweek
pip install -e .
pip install -e .[dev]
pip install -e .[unittest]
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
dateweek-0.1.1.tar.gz
(8.4 kB
view hashes)