DBTime interface

The DBTime global creates instances which represent time values for the Database interface. It’s modelled after the built in Date object, so uses the new operator for construction.

Construction

function new DBTime(hours, minutes, seconds)

All arguments are optional, defaulting to 0 if not specified.

function DBTime.parse(string)

Attempts to parse a string, returning null if it was invalid. Times must be of the form DD:DD or DD:DD:DD where D is a digit.

Interface

function toString()

Return the string representation of this time, in the form DD:DD:DD. If the seconds are zero, they will be omitted.

function getHours()

Returns the hour (0-23) in the time.

function getMinutes()

Returns the minutes (0-59) in the time.

function getSeconds()

Returns the minutes (0-59) in the time.

function setHours(hours)

Sets the hours (0-23) for this time.

function setMinutes(minutes)

Sets the minutes (0-59) for this time.

function setSeconds(seconds)

Sets the minutes (0-59) for this time.

function getTime()

Returns the number of milliseconds past midnight.