MonthDayHour
A struct in Root.Township, the global namespace.
A point in the year (month, day, hour) with no year, used for seasonal or dated events. Compares in month, day, hour order.
- Listed in Global namespace: M to O
- Inherits or implements IComparable<MonthDayHour>, IEquatable<MonthDayHour>
- Derived types
MonthDayHour
Constructors
| Member | What it is |
|---|---|
MonthDayHour(Month month, int day, int hour) | Creates a MonthDayHour from month, day and hour. |
Fields
4 private and internal fields
| Member | What it is |
|---|---|
private static MonthDayHour current | Unused static field. The Current property builds a fresh value from UTC now instead. |
private int day | Day of the month, 1 to 32 in the inspector. |
private int hour | Hour of the day, 0 to 23. |
private Month month | The month. |
Properties
| Member | What it is |
|---|---|
static MonthDayHour Current { get; } | The current UTC month, day and hour. |
int Day { get; } | Day of the month. |
int Hour { get; } | Hour of the day, 0 to 23. |
Month Month { get; } | The month. |
Methods
| Member | What it is |
|---|---|
int CompareTo(MonthDayHour other) | Orders by month, then day, then hour. |
override bool Equals(object obj) | True if month, day and hour match. |
bool Equals(MonthDayHour other) | True if month, day and hour match. |
override int GetHashCode() | Hash from month, day and hour. |
bool IsBetween(MonthDayHour start, MonthDayHour end) | True if strictly after start and before end. Handles ranges that wrap past the year end. |
static bool op_Equality(MonthDayHour a, MonthDayHour b) | Same month, day and hour. |
static bool op_GreaterThan(MonthDayHour a, MonthDayHour b) | Later in the year. |
static bool op_Inequality(MonthDayHour a, MonthDayHour b) | Different month, day or hour. |
static bool op_LessThan(MonthDayHour a, MonthDayHour b) | Earlier in the year. |
Used in
Members of other types that take, return or hold a MonthDayHour: