SoHL's world calendar — a foundry.data.CalendarData subclass that adds an era model (epoch name/abbreviation, before-era labelling, optional year zero) on top of Foundry's year/month/day/season schema, and overrides the timestamp formatters to render SoHL-style dates (e.g. 15 Highsun 722TR).

The active world calendar is available at runtime as sohl.calendar.

Hierarchy

Properties

days: {
    daysPerYear: number;
    hoursPerDay: number;
    minutesPerHour: number;
    secondsPerMinute: number;
    values: [{ abbreviation: string; name: string; ordinal: number }];
}

Weekday definitions and time-unit divisions.

Type declaration

  • daysPerYear: number

    Total days per year.

  • hoursPerDay: number

    Hours per day.

  • minutesPerHour: number

    Minutes per hour.

  • secondsPerMinute: number

    Seconds per minute.

  • values: [{ abbreviation: string; name: string; ordinal: number }]

    Ordered list of weekdays.

description: string

Calendar description.

era: {
    abbrev: string;
    beforeAbbrev: string;
    beforeName: string;
    description: null | string;
    hasYearZero: boolean;
    name: string;
}

Era model layered on top of the base schema.

Type declaration

  • abbrev: string

    Era abbreviation for dates on or after the epoch.

  • beforeAbbrev: string

    Era abbreviation for dates before the epoch.

  • beforeName: string

    Era name for dates before the epoch.

  • description: null | string

    Free-text description of the era.

  • hasYearZero: boolean

    Whether the era includes a year zero.

  • name: string

    Era name for dates on or after the epoch.

months: {
    values: [
        {
            abbreviation: string;
            days: number;
            leapDays: number;
            name: string;
            ordinal: number;
        },
    ];
}

Month definitions.

Type declaration

  • values: [
        {
            abbreviation: string;
            days: number;
            leapDays: number;
            name: string;
            ordinal: number;
        },
    ]

    Ordered list of months.

name: string

Calendar display name.

seasons: {
    values: [
        {
            abbreviation: string;
            dayEnd: number;
            dayStart: number;
            monthEnd: number;
            monthStart: number;
            name: string;
        },
    ];
}

Season definitions.

Type declaration

  • values: [
        {
            abbreviation: string;
            dayEnd: number;
            dayStart: number;
            monthEnd: number;
            monthStart: number;
            name: string;
        },
    ]

    Ordered list of seasons.

years: {
    firstWeekday: number;
    leapYear: { leapInterval: number; leapStart: number };
    yearZero: number;
}

Year-level configuration (epoch, first weekday, leap-year rule).

Type declaration

  • firstWeekday: number

    Index of the weekday the year starts on.

  • leapYear: { leapInterval: number; leapStart: number }

    Leap-year cadence.

    • leapInterval: number

      Number of years between leap years.

    • leapStart: number

      First year a leap year occurs.

  • yearZero: number

    The year treated as the calendar's zero point.

Accessors

Methods

  • Resolve a month's name by index (supports negative indices, per Array.prototype.at).

    Parameters

    • monthIndex: number

      Zero-based month index.

    Returns string

    The month's name.

    Error if the index does not correspond to a defined month.

  • Resolve a weekday's name by index (supports negative indices, per Array.prototype.at).

    Parameters

    • weekdayIndex: number

      Zero-based weekday index.

    Returns string

    The weekday's name.

    Error if the index does not correspond to a defined weekday.