Class: Time

Time()

Time class, you can code time-related things

Constructor

new Time()

Source:

Methods

(static) ConvertToDate(…args) → {DateConstructor}

Convert something to Date format.
Parameters:
Name Type Attributes Description
args any <repeatable>
Thing to convert to Date
Source:
Returns:
Type
DateConstructor

(static) EndConsoleTimer(label) → {VoidFunction}

End a console timer, this is a timer when it finishes it will print the name and duration
Parameters:
Name Type Description
label String Name of the console timer to finish
Source:
Returns:
Type
VoidFunction

(static) GetCurrentDate() → {DateConstructor}

Get current date
Source:
Returns:
Type
DateConstructor

(static) GetCurrentHour(utc) → {Number}

Get current hour
Parameters:
Name Type Default Description
utc Boolean false Choose if get UTC or local
Source:
Returns:
Type
Number

(static) GetCurrentMilliseconds(utc) → {Number}

Get current milliseconds
Parameters:
Name Type Default Description
utc Boolean false Choose if get UTC or local
Source:
Returns:
Type
Number

(static) GetCurrentMinutes(utc) → {Number}

Get current minutes
Parameters:
Name Type Default Description
utc Boolean false Choose if get UTC or local
Source:
Returns:
Type
Number

(static) GetCurrentMonth(utc) → {Number}

Get current month
Parameters:
Name Type Default Description
utc Boolean false Choose if get UTC or local
Source:
Returns:
Type
Number

(static) GetCurrentMonthDay(utc) → {Number}

Get current day, but day in month format (1-31)
Parameters:
Name Type Default Description
utc Boolean false Choose if get UTC or local
Source:
Returns:
Type
Number

(static) GetCurrentSeconds(utc) → {Number}

Get current seconds
Parameters:
Name Type Default Description
utc Boolean false Choose if get UTC or local
Source:
Returns:
Type
Number

(static) GetCurrentTime() → {Number}

Get current time
Source:
Returns:
Type
Number

(static) GetCurrentWeekDay(utc) → {Number}

Get current day, but day in week format (1-7)
Parameters:
Name Type Default Description
utc Boolean false Choose if get UTC or local
Source:
Returns:
Type
Number

(static) GetCurrentYear(utc) → {Number}

Get current year
Parameters:
Name Type Default Description
utc Boolean false Choose if get UTC or local
Source:
Returns:
Type
Number

(static) GetDifferenceUTCAndLocal() → {Number}

Get difference between UTC and local
Source:
Returns:
Type
Number

(static) StartConsoleTimer(label) → {VoidFunction}

Start a console timer, this is a timer when it finishes it will print the name and duration
Parameters:
Name Type Description
label String Name of the console timer
Source:
Returns:
Type
VoidFunction

(static) getString() → {String}

Get source code of this class
Source:
Returns:
Type
String