World & Progression

Calendar

The full Dinkum calendar: 4 seasons of 28 days each (112 days total), with every birthday and event embedded on the day it occurs.


Why this module is different

Unlike other modules, calendar days have no id or name field, so CalendarQuery does not extend QueryBase<T>. Instead of find() and findByName(), it addresses days by season and day number, and adds calendar-specific lookups for birthdays and events.


Type

CalendarDay

FieldTypeDescription
daynumberDay of the season, 1-28
seasonSeason'Summer', 'Autumn', 'Winter', or 'Spring'
weekdayWeekdayDay of the week
eventsCalendarEvent[]Events occurring on this day
birthdaysBirthday[]NPC birthdays occurring on this day

Birthday

FieldTypeDescription
daynumberDay of the season
seasonSeasonSeason the birthday falls in
characterstringNPC name
likesstringTheir favorite gift

CalendarEvent

FieldTypeDescription
namestringEvent name
startDaynumberFirst day of the season the event runs
endDaynumberLast day of the season the event runs
seasonSeasonSeason the event occurs in
emojistringEmoji shown alongside the event name

Factory

import { calendar } from 'dinkum-data'

calendar() // a CalendarQuery over all 112 days

Methods

get(): CalendarDay[]

Returns every day in the calendar, in season order (Summer, Autumn, Winter, Spring).

calendar().get() // CalendarDay[112]

count(): number

Returns the number of days (always 112).

bySeason(season: Season): CalendarDay[]

Returns every day in the given season (always 28 days).

calendar().bySeason('Summer')

getDay(season: Season, day: number): CalendarDay | undefined

Returns a single day by season and day number, or undefined if it doesn't exist.

calendar().getDay('Summer', 22)

getAllBirthdays(): Birthday[]

Returns every birthday across the whole calendar.

getAllEvents(): CalendarEvent[]

Returns every event across the whole calendar.

getBirthday(character: string): Birthday | undefined

Returns the birthday for the given character (case-insensitive), or undefined if not found.

calendar().getBirthday('Fletch')

Examples

import { calendar } from 'dinkum-data'

// Every day in Winter
calendar().bySeason('Winter')

// What's happening on Summer day 22
calendar().getDay('Summer', 22)
// { day: 22, season: 'Summer', events: [{ name: 'Fish Catching Competition', ... }], ... }

// When is Fletch's birthday
calendar().getBirthday('Fletch')
// { day: 1, season: 'Summer', character: 'Fletch', likes: 'Bush Lime' }

// Every event in the game
calendar().getAllEvents()

Next steps

  • See the core concepts page for why Calendar and a few other modules skip the standard QueryBase pattern
  • Browse NPCs for the NPC records these birthdays reference
  • See Daily Milestones for the related repeatable task pool
Previous
Daily milestones