Struct CalendarTime
- Namespace
- SkyrimForge.Game
- Assembly
- SkyrimForge.dll
A date and time laid out as the C runtime's tm, which Calendar.GetTime and the GetBeginTime, GetEndTime, and ConvertInterval of TESClimate.Timing.Interval return.
The fields store the game's calendar values rather than tm's. An interval's time fills only Minute and Hour, and every other field is zero.
public readonly struct CalendarTime : IEquatable<CalendarTime>
- Implements
- Inherited Members
Constructors
CalendarTime(int, int, int, int, int, int, int, int, int)
A date and time laid out as the C runtime's tm, which Calendar.GetTime and the GetBeginTime, GetEndTime, and ConvertInterval of TESClimate.Timing.Interval return.
The fields store the game's calendar values rather than tm's. An interval's time fills only Minute and Hour, and every other field is zero.
public CalendarTime(int Second, int Minute, int Hour, int DayOfMonth, int Month, int Year, int DayOfWeek, int DayOfYear, int DaylightSaving)
Parameters
SecondintZero.
MinuteintThe minute of the hour.
HourintThe hour of the day, from 0.
DayOfMonthintThe day of the month, from 1.
MonthintThe month, as an index of
Calendar.Month, where 0 is Morning Star.YearintThe year of the era. A new game begins in 201.
DayOfWeekintThe day of the week, as an index of
Calendar.Day, where 0 is Sundas.DayOfYearintThe day of the year, from 1. CommonLib adds the lengths of the earlier months but leaves out the last of them, so after Morning Star the value is short by the previous month's length.
DaylightSavingintZero.
Properties
DayOfMonth
The day of the month, from 1.
public int DayOfMonth { get; init; }
Property Value
DayOfWeek
The day of the week, as an index of Calendar.Day, where 0 is Sundas.
public int DayOfWeek { get; init; }
Property Value
DayOfYear
The day of the year, from 1. CommonLib adds the lengths of the earlier months but leaves out the last of them, so after Morning Star the value is short by the previous month's length.
public int DayOfYear { get; init; }
Property Value
DaylightSaving
Zero.
public int DaylightSaving { get; init; }
Property Value
Hour
The hour of the day, from 0.
public int Hour { get; init; }
Property Value
Minute
The minute of the hour.
public int Minute { get; init; }
Property Value
Month
The month, as an index of Calendar.Month, where 0 is Morning Star.
public int Month { get; init; }
Property Value
Second
Zero.
public int Second { get; init; }
Property Value
Year
The year of the era. A new game begins in 201.
public int Year { get; init; }
Property Value
Methods
Deconstruct(out int, out int, out int, out int, out int, out int, out int, out int, out int)
public void Deconstruct(out int Second, out int Minute, out int Hour, out int DayOfMonth, out int Month, out int Year, out int DayOfWeek, out int DayOfYear, out int DaylightSaving)
Parameters
SecondintMinuteintHourintDayOfMonthintMonthintYearintDayOfWeekintDayOfYearintDaylightSavingint
Equals(CalendarTime)
public bool Equals(CalendarTime other)
Parameters
otherCalendarTime
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(CalendarTime, CalendarTime)
public static bool operator ==(CalendarTime left, CalendarTime right)
Parameters
leftCalendarTimerightCalendarTime
Returns
operator !=(CalendarTime, CalendarTime)
public static bool operator !=(CalendarTime left, CalendarTime right)
Parameters
leftCalendarTimerightCalendarTime