![]() |
Trackmania ManiaScript Reference 2025.6.19.2137
A ManiaScript Reference of the new Trackmania.
|
Standard time manipulation functions. More...
Enumerations | |
| enum | EDateFormats { Full , Date , DateCompact , DateShort , Time , TimeShort , Relative , RelativeShort , MonthYear } |
| enum | EDurationFormats { Full , Abbreviated , Chrono } |
Functions | |
| Text | FormatDate (Text _Timestamp, EDateFormats _Format) |
| Returns the date corresponding to a timestamp, formatted according to the locale. Not available on servers. | |
| Text | FormatDelta (Text _Timestamp1, Text _Timestamp2, EDurationFormats _Format) |
| Returns the duration between 2 timestamps, formatted according to the locale. Not available on servers. | |
| Text | FormatDelta (Text _Delta, EDurationFormats _Format) |
| Returns the duration Delta formatted according to the locale. Not available on servers. | |
| Integer | Compare (Text _Timestamp1, Text _Timestamp2) |
| Compares 2 timestamps. | |
| Real | Clamp01 (Text _Boundary1, Text _Boundary2, Text _Timestamp) |
| Returns a Real between 0 and 1, given an interval and a timestamp. | |
| Real | Clamp01TZDay (Text _Timestamp) |
| Returns a Real between 0 and 1, given a timestamp, according to the day cycle in local timezone. | |
| Real | Clamp01UTCDay (Text _Timestamp) |
| Returns a Real between 0 and 1, given a timestamp, according to the day cycle in UTC timezone. | |
| Text | GetCurrent () |
| Gets current timestamp. | |
| Integer | GetDelta (Text _Timestamp1, Text _Timestamp2) |
| Returns the duration in seconds between 2 timestamps. May be clamped if huge. | |
| Integer | GetLocalDelta_Years (Text _Timestamp1, Text _Timestamp2) |
| Returns the duration in complete years between 2 timestamps, according to the local dates. | |
| Integer | GetLocalDelta_Months (Text _Timestamp1, Text _Timestamp2) |
| Returns the duration in complete months between 2 timestamps, according to the local dates. | |
| Integer | GetMillisecondsSinceInit () |
| Returns local milliseconds elapsed since game initialisation. | |
Standard time manipulation functions.
Returns a Real between 0 and 1, given an interval and a timestamp.
| _Boundary1 | : Lower boundary defining the time interval |
| _Boundary2 | : Higher boundary defining the time interval |
| _Timestamp | : Timestamp to check |
Returns a Real between 0 and 1, given a timestamp, according to the day cycle in local timezone.
| _Timestamp | : Timestamp to check |
Returns a Real between 0 and 1, given a timestamp, according to the day cycle in UTC timezone.
| _Timestamp | : Timestamp to check |
Compares 2 timestamps.
| _Timestamp1 | : Unix timestamp |
| _Timestamp2 | : Unix timestamp |
| Text TimeLib::FormatDate | ( | Text | _Timestamp, |
| EDateFormats | _Format ) |
Returns the date corresponding to a timestamp, formatted according to the locale. Not available on servers.
| _Timestamp | : Timestamp to format |
| _Format | : Format |
| Text TimeLib::FormatDelta | ( | Text | _Delta, |
| EDurationFormats | _Format ) |
Returns the duration Delta formatted according to the locale. Not available on servers.
| _Delta | : Delta in seconds |
| _Format | : Format |
| Text TimeLib::FormatDelta | ( | Text | _Timestamp1, |
| Text | _Timestamp2, | ||
| EDurationFormats | _Format ) |
Returns the duration between 2 timestamps, formatted according to the locale. Not available on servers.
| _Timestamp1 | : Timestamp1 |
| _Timestamp2 | : Timestamp2 |
| _Format | : Format |
| Text TimeLib::GetCurrent | ( | ) |
Gets current timestamp.
Returns the duration in seconds between 2 timestamps. May be clamped if huge.
| _Timestamp1 | : First timestamp. Result will be positive if this one is bigger/more recent |
| _Timestamp2 | : Second timestamp |
Returns the duration in complete months between 2 timestamps, according to the local dates.
| _Timestamp1 | : First timestamp. Result will be positive if this one is bigger/more recent |
| _Timestamp2 | : Second timestamp |
Returns the duration in complete years between 2 timestamps, according to the local dates.
| _Timestamp1 | : First timestamp. Result will be positive if this one is bigger/more recent |
| _Timestamp2 | : Second timestamp |
| Integer TimeLib::GetMillisecondsSinceInit | ( | ) |
Returns local milliseconds elapsed since game initialisation.