Timeutils
Package that handles ingame and real world time.
Including Code
include ":timeutils:gameTime";CONST
enum TIME_UNITS
// Base unit: Millisecond
MIL_SECOND := 1000,
MIL_MINUTE := MIL_SECOND * 60,
MIL_HOUR := MIL_MINUTE * 60,
MIL_DAY := MIL_HOUR * 24,
MIL_WEEK := MIL_DAY * 7,
MIL_MONTH := MIL_DAY * 30,
MIL_YEAR := MIL_MONTH * 12,
// Base unit: Second
SEC_MINUTE := 60,
SEC_HOUR := SEC_MINUTE * 60,
SEC_DAY := SEC_HOUR * 24,
SEC_WEEK := SEC_DAY * 7,
SEC_MONTH := SEC_DAY * 30,
SEC_YEAR := SEC_DAY * 365,
// SleepMs value to prevent RunAway
NO_RUNAWAY := 10
endenumGetTime()
GetTimeStruct(time)
FormatTime(byref time_struct, format)
Month
GetMonthName(month)
GetMonthFullName(month)
GetMonthOrdinal(month)
GetMonthLength(month, year := 0)
GetMonthDifferential( byref current_month, byref previous_month )
Other
IsLeap()
GetCurrentPlaytimeMonth()
Last updated