A Reservation Calendar System
Project description
Reservation Calendar
This module allows you to create a week based calendar for your reservations.
For seasonal resorts, this module calculates week numbers and reservation dates based on a reference day (Memorial Day by default). The calendar is lightweight and uses pure Python with no external dependencies.
Inspired by Fun Valley Family Resort in South Fork, Colorado, USA.
How it works
At Fun Valley guests are allowed to book "their" dates for the following year at checkout. Since the resort is seasonal, opening on Memorial Day each year, the calendar slides forward and backward every 7th year. Every 7th year there are 6 weeks in May.
If you stay in a cabin on June 9th, 2023 (Friday) thru June 11th, 2023 (Monday), you can book the same DAYS for the following year. The calendar will show you the dates for the following year, June 7th, 2024 (Friday) thru June 10th, 2024 (Monday).
Since reservations are based on the day of the week in the given week of the season, the dates are calculated based on the day of the week of the current reservation.
How to use it
from reservation_calendar import ReservationCalendar
calendar = ReservationCalendar()
# Get week number and weekday number for a given date
date = datetime(2023, 6, 9)
week_number, weekday_number = calendar.get_week_info(date)
print("Week number:", week_number)
print("Weekday number:", weekday_number)
# Get day name for a given date
day_name = calendar.get_day_name(date)
print("Day name:", day_name)
print(f"Future Reservation Dates for {date}:")
for year in range(2024, 2035):
print(f"{calendar.get_reservation_start_date(date, year)}")
Output
Week number: 2
Weekday number: 5
Day name: Friday
Future Reservation Dates for 2023-06-09:
2024-06-07
2025-06-06
2026-06-05
2027-06-11
2028-06-09
2029-06-08
2030-06-07
2031-06-06
2032-06-11
2033-06-10
2034-06-09
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reservation_calendar-1.0.tar.gz.
File metadata
- Download URL: reservation_calendar-1.0.tar.gz
- Upload date:
- Size: 18.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4350be80cedf38098268194d0735d70fbf95b8cc1e06a389c1b1fd709222be7
|
|
| MD5 |
1104ff2b6779d8fa49e1bda6d35d3572
|
|
| BLAKE2b-256 |
985d136592a5031c70481c1d0670fb7935c4f44ffc0dab2872243dd8cce3802d
|
File details
Details for the file reservation_calendar-1.0-py3-none-any.whl.
File metadata
- Download URL: reservation_calendar-1.0-py3-none-any.whl
- Upload date:
- Size: 17.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74e2e754b4f86ff6d87a66a2bb69d309856d45f7517df3fbaa26b33795c0e26d
|
|
| MD5 |
0e8ad6ae04e21832f63d26a296048830
|
|
| BLAKE2b-256 |
8a677d1bb39bdc46652727756e94d5d7240f2f9e018ccfd8deeb2d07433dea91
|