Time

lumin.ui. Time

new Time(hour,, minute,, second,)

Creates Time object with hour, minute, second.

Parameters:
Name Type Description
hour, number

hour in the range 0-23.

minute, number

minute in the range 0-59.

second, number

second in the range 0-59.

Methods

(static) GetCurrentTime() → {lumin.ui.Time}

Get the time now

Returns:

a Time object with current time

Type
lumin.ui.Time

hour() → {number}

Get the hour in 24 hour time.

Returns:

hour, hour in the range 0-23.

Type
number

minute() → {number}

Gets the minute.

Returns:

minute, minute in the range 0-59.

Type
number

period() → {lumin.ui.TimePeriod}

Gets the TimePeriod, kAM or kPM.

Returns:

TimePeriod, will return kAM for hour 0-11, kPM for hour 12-23.

Type
lumin.ui.TimePeriod

second() → {number}

Gets the second.

Returns:

second, second in the range 0-59.

Type
number

setHour(hour,)

Sets the hour in 24 hour time. Clamping will be applied for out of range values.

Parameters:
Name Type Description
hour, number

hour to be set in the range 0-23.

setMinute(minute,)

Sets the minute. Clamping will be applied for out of range values.

Parameters:
Name Type Description
minute, number

minute in the range 0-59.

setSecond(second)

Sets the second. Clamping will be applied for out of range values.

Parameters:
Name Type Description
second number
Returns:

second, second in the range 0-59.

twelveHourForm() → {number}

Get the hour in 12 hour time.

Returns:

hour, hour in the range 1-12.

Type
number

lumin.ui. Time

Simple Time class with access to hour/minute/second/period

Constructor

new Time()

Default ctr

Methods

(static) GetCurrentTime() → {lumin.ui.Time}

Get the time now

Returns:

a Time object with current time

Type
lumin.ui.Time

hour() → {number}

Get the hour in 24 hour time.

Returns:

hour, hour in the range 0-23.

Type
number

minute() → {number}

Gets the minute.

Returns:

minute, minute in the range 0-59.

Type
number

period() → {lumin.ui.TimePeriod}

Gets the TimePeriod, kAM or kPM.

Returns:

TimePeriod, will return kAM for hour 0-11, kPM for hour 12-23.

Type
lumin.ui.TimePeriod

second() → {number}

Gets the second.

Returns:

second, second in the range 0-59.

Type
number

setHour(hour,)

Sets the hour in 24 hour time. Clamping will be applied for out of range values.

Parameters:
Name Type Description
hour, number

hour to be set in the range 0-23.

setMinute(minute,)

Sets the minute. Clamping will be applied for out of range values.

Parameters:
Name Type Description
minute, number

minute in the range 0-59.

setSecond(second)

Sets the second. Clamping will be applied for out of range values.

Parameters:
Name Type Description
second number
Returns:

second, second in the range 0-59.

twelveHourForm() → {number}

Get the hour in 12 hour time.

Returns:

hour, hour in the range 1-12.

Type
number