Pub.StdC
Structs
| Struct | Description |
|---|---|
| SDateTime | A basic DateTime struct. |
Enums
| Enum | Description |
|---|---|
| EWeekday | Enumeration for the days of the week. |
| EShortWeekday | Enumeration for the abbreviated days of the week. |
Functions
Function CurrentDateTime(dt:SDateTime Var, utc:Int = True)
Returns the current date and time.
Function CurrentUnixTime:ULong()
Returns the current Unix time in milliseconds.
The Unix time is a system for describing a point in time, defined as the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970, minus the number of leap seconds.
Function WeekDayToShortWeekday:EShortWeekday(day:EWeekday)
Converts an EWeekday value to its corresponding EShortWeekday value.
Returns
The corresponding EShortWeekday value.
Function ShortWeekdayToWeekDay:EWeekday(shortDay:EShortWeekday)
Converts an EShortWeekday value to its corresponding EWeekday value.
Returns
The corresponding EWeekday value.
Function CurrentDate:String(_format:String="%d <i>b</i> <i>Y</i>")
Gets the current date string.
By default, it returns the current date in the format: DD MON YYYY (i.e. 10 DEC 2000). You can also specify some parameters to return the date in a format of your choice:
| parameter | description |
| %%a | Abbreviated day name (sun - mon). |
| %%A | Long day name (Sunday - Monday). |
| %%b | Abbreviated month name (jan - feb). |
| %%B | Long month name (January...). |
| %%c | Locale date & time. |
| %%d | day - in number (1..31). |
| %%H | hour - in number (0..23). |
| %%I | hour - in number (1..12). |
| %%j | day of the year (1..366). |
| %%m | month - in number (1..12). |
| %%M | minutes - in number (00..59). |
| %%P | AM / PM. |
| %%S | seconds - in number (00..59). |
| %%U | week number |
| %%w | day of the week (0..6). |
| %%W | week of the year (0..53). |
| %%x | locale data representation. |
| %%y | year without century (2014 --> 14). |
| %%Y | Year (2014). |
| %%Z | Time zone name. |
You can use these parameters together:
CurrentDate("Month: %%a Day: %%d")
Returns
The current date as a string
Function CurrentTime:String()
Gets the current time string.
Returns the current time in the format: HH:MM:SS (i.e. 14:31:57).
Returns
The current time as a string
