newTime

Top  Previous  Next

This creates a new Time object. Passing a number allows the time since 0:00 to be set in milliseconds.

Definition

Time = date.newTime( hour, minute, seconds, milliseconds )

 

Name

Type

Description

hour [optional]

number

hours since midnight

minutes [optional]

number

minutes passed the hour

seconds [optional]

number

seconds

milliseconds [optional]

number

milliseconds

Time

Time object

Returns a Time object

Example

myTime = date.newTime( 16, 30, 10 )

print(myTime)

 

This will print

 

16:30:10

Related

Time object

Date object

Availability

Lua