Skip to content
ct

Class

GameCalendar

Generated GDScript class reference for CalendarTime.GameCalendar.

Status
Current
Version
v2.0.4
Updated
2026-08-09

Handles conversions between units of game time

Source: addons/calendar_time/game_time/game_calendar/game_calendar.gd

Syntax

class GameCalendar extends Resource

Members

NameKindSummary
CalendarLogicField`CalendarLogic` is preloaded here for calendar arithmetic.
CalendarStructureField`CalendarStructure` is preloaded here to describe the calendar layout.
CalendarValidatorField`CalendarValidator` is preloaded here to validate calendar definitions.
display_namePropertyUI-friendly display name for the calender resource
yearsPropertyThe year objects that the calendar represents. After reaching the end of the years array, years will be recycled in sequence. Must have a minumum of one game year defined for the calendar to function.
days_per_weekPropertyNumber of days in one week for this calendar.
start_day_of_week_indexPropertyThe array index that the first day of the week starts at
time_scalePropertyDefines the conversions between time units.
times_of_dayPropertyThe named phases of a calendar day (dawn, day, dusk, night, ...). Each `TimeOfDay` defines an `HoursTime` enter-time; `DayNightCycleService` reads this list to derive `time_of_day_changed` transitions. Calendars own these — not clocks, not the host — so any clock bound to this calendar automatically shares the same day-phase schedule.
start_datePropertyDate that the calendar treats as its epoch or first day.
structurePropertyResolved calendar structure produced from the configured definition.
safePropertyValidation-safe calendar structure resolved from the configured definition.
safe_days_per_weekPropertyClamped days-per-week so the week manager is never broken.
advance_date_timeMethod
get_game_yearMethod
get_event_dayMethod
get_game_monthMethod
get_day_of_week_indexMethod
get_days_per_weekMethod
get_days_betweenMethod
get_months_betweenMethod
get_days_into_yearMethod
get_next_dayMethod
get_next_date_timeMethod
get_previous_dateMethod
get_seconds_from_dateMethod
get_last_hours_time_as_secsMethod
get_last_hours_time_as_date_timeMethod
validate_runtimeMethod
get_scaleMethod
get_seconds_from_date_timeMethod
get_config_identityMethod