pub_stdc.md 3.2 KB


id: pub.stdc title: Pub.StdC

sidebar_label: Introduction

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:

parameterdescription
%%aAbbreviated day name (sun - mon).
%%ALong day name (Sunday - Monday).
%%bAbbreviated month name (jan - feb).
%%BLong month name (January...).
%%cLocale date & time.
%%dday - in number (1..31).
%%Hhour - in number (0..23).
%%Ihour - in number (1..12).
%%jday of the year (1..366).
%%mmonth - in number (1..12).
%%Mminutes - in number (00..59).
%%PAM / PM.
%%Sseconds - in number (00..59).
%%Uweek number
%%wday of the week (0..6).
%%Wweek of the year (0..53).
%%xlocale data representation.
%%yyear without century (2014 --> 14).
%%YYear (2014).
%%ZTime 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