Class MonthDefinition
Serializable description of a single month in a custom calendar. A CalendarDefinition holds an ordered list of these to describe its year.
Inherited Members
Namespace: Scylla.Core.Time
Assembly: ScyllaCore.dll
Syntax
[Serializable]
public sealed class MonthDefinition
Remarks
Months may have variable lengths (e.g., Gregorian) or uniform lengths (e.g., Dwarf Fortress 12 x 28 = 336-day year). Each month references a SeasonIndex entry on the parent calendar so multiple months can map to the same season.
Constructors
MonthDefinition()
Default constructor for serialization.
Declaration
public MonthDefinition()
MonthDefinition(string, string, int, int)
Code-only constructor used by tests and built-in calendar presets.
Declaration
public MonthDefinition(string name, string shortName, int daysInMonth, int seasonIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| string | shortName | |
| int | daysInMonth | |
| int | seasonIndex |
Properties
DaysInMonth
Number of days in this month (>= 1).
Declaration
public int DaysInMonth { get; }
Property Value
| Type | Description |
|---|---|
| int |
Name
Full month name.
Declaration
public string Name { get; }
Property Value
| Type | Description |
|---|---|
| string |
SeasonIndex
Zero-based season index referenced on the parent CalendarDefinition.
Declaration
public int SeasonIndex { get; }
Property Value
| Type | Description |
|---|---|
| int |
ShortName
Compact month name for HUD/UI.
Declaration
public string ShortName { get; }
Property Value
| Type | Description |
|---|---|
| string |