Class: TimePoint
Functions
Name | Description |
---|---|
.fromEpoch(epoch) | Parses and returns a new TimePoint from a UNIX integer epoch |
.fromIso(text) | Parses and returns a new TimePoint from an ISO formatted date time string |
.now() | Returns a new TimePoint of the current (now) system time |
Methods
Name | Description |
---|---|
:epoch() | |
:toIso() |
Function declarations
Function: fromEpoch
Parses and returns a new TimePoint from a UNIX integer epoch
lua
function TimePoint.fromEpoch(
epoch
) end
Parameters:
- epoch (
integer
) - The UNIX epoch as an integer
Returns:
- TimePoint - Returns a new TimePoint
Function: fromIso
Parses and returns a new TimePoint from an ISO formatted date time string
lua
function TimePoint.fromIso(
text
) end
Parameters:
- text (
string
) - The date time string in ISO format
Returns:
- TimePoint - Returns a new TimePoint
Function: now
Returns a new TimePoint of the current (now) system time
lua
function TimePoint.now() end
Returns:
- TimePoint - Returns a new TimePoint
Method declarations
Method: epoch
lua
function TimePoint:epoch() end
Returns:
integer
- Returns the epoch UNIX time as an integer
Method: toIso
lua
function TimePoint:toIso() end
Returns:
string
- Returns the time as an ISO formatted date time string