Skip to main content

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 creates a list of weeks for 5 previous years and 10 future years. This weekly calendar is used to pick future dates based on the current reservation.

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 FVRC week number and weekday number for a given date
date = datetime(2023, 6, 9)
fvrc_week_number, fvrc_weekday_number = calendar.get_fvrc(date)
print("FVRC week number:", fvrc_week_number)
print("FVRC weekday number:", fvrc_weekday_number)

# Get FVRC day name for a given date
fvrc_day_name = calendar.get_fvrc_day(date)
print("FVRC day name:", fvrc_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

FVRC week number: 2
FVRC weekday number: 5
FVRC 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reservation_calendar-0.0.1.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reservation_calendar-0.0.1-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file reservation_calendar-0.0.1.tar.gz.

File metadata

  • Download URL: reservation_calendar-0.0.1.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

Hashes for reservation_calendar-0.0.1.tar.gz
Algorithm Hash digest
SHA256 24c7bdca85073ddf19e8e3eaaf0f4251030e7b618a4a76b7c37fa15f81afb82a
MD5 12280d023df9ec11b5ca3be6fb6df50b
BLAKE2b-256 4ee9e1cb74b7d69de5aae9727aad252874a4e6b5f28239a647da2b295a8c01aa

See more details on using hashes here.

File details

Details for the file reservation_calendar-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for reservation_calendar-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d721736787261cc2231e89056b981f98ecca0e9b70292be74ff06f28e9c7c9b9
MD5 8cd4da4727b22ed68db1f8d8df1b6368
BLAKE2b-256 55df17202f22ea1ec9c97e80a53b91b0681c628648724d56f2a5f456254850cf

See more details on using hashes here.

Supported by

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