Rest
...params: [string] | [Date] | [number, number, number?, number?]// equiv. to `new DataAPITime('12:34:56')`
time('12:34:56')
// equiv. to `new DataAPITime(12, 34)
time(12, 34)
// equiv. to `DataAPITime.now()`
time.now()
The current time in the local timezone
const now = time.now();
// or
const now = DataAPITime.now()
Creates a DataAPITime
from the number of nanoseconds since the start of the day .
The number must be a positive integer in the range [0, 86,399,999,999,999].
The number of nanoseconds since the start of the day
The DataAPITime
representing the given number of nanoseconds
DataAPITime.ofNanoOfDay(0) // '00:00:00.000000000'
date.ofNanoOfDay(12_345_678_912_345) // '03:25:45.678912345'
Creates a DataAPITime
from the number of seconds since the start of the day.
The number must be a positive integer in the range [0, 86,399].
The number of seconds since the start of the day
The DataAPITime
representing the given number of seconds
DataAPITime.ofSecondOfDay(0) // '00:00:00.000000000'
DataAPITime.ofSecondOfDay(12_345) // '03:25:45.000000000'
The current time in UTC
const now = time.utcnow();
// or
const now = DataAPITime.utcnow()
Overview
A shorthand function-object for DataAPITime. May be used anywhere when creating new
DataAPITime
s.See DataAPITime and its methods for information about input parameters, formats, functions, etc.