Calendar

A calendar month for availability display, used by the experience slot, calendar and package search calendar tags.

A calendar month for availability display, used by the experience slot, calendar and package search calendar tags.

The type of each entry in #dates depends on which tag rendered the calendar.

Properties

dates

The dates within this calendar month.

Returns: Array (ExperienceSlotCalendar::DateDrop) or Array (PackagesSearchCalendar::DateDrop) — each entry is an ExperienceSlotCalendar::DateDrop when rendered by ExperienceSlotCalendarTag, or a PackagesSearchCalendar::DateDrop when rendered by PackagesSearchAndCalendarTag.

first_day

The first day of this calendar month.

Returns: Date — use with Liquid's date filter to format the month name, e.g. "%B %Y".

{{ calendar.next.first_day | date: "%B %Y" }}

initialize

Returns: CalendarDrop — a new instance of CalendarDrop

month

The calendar month number.

Returns: Integer — from 1 (January) to 12 (December).

next

Navigation values for the next calendar month.

Returns: Hash{String=>Date, Integer} — keys are "first_day", "month", and "year".

prev

Navigation values for the previous calendar month.

Returns: Hash{String=>Date, Integer} — keys are "first_day", "month", and "year".

year

Returns the value of attribute year.

On this page