Skip to main content

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


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)

Uploaded Source

Built Distribution

dateweek-0.1.1-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page