Skip to content

getTime(mixed time)

The getTime method is used to get a Time object that represents given time.

Input parameters

time

mixed Numeric number of seconds or iso8601 time string.

Returned value

The Time object.

Example

source
{% set time = ObjectApi.getTime("12:30:15") %}
{{ time.hours }}
output
12