Time

Time object

Constructors

Link copied to clipboard
constructor()
constructor(address: Long)

Types

Link copied to clipboard
object Companion

Time's companion

Properties

Link copied to clipboard

Address of native referenced object. nullptr if not referencing any native allocated object. Note native allocation will happen only once.

Link copied to clipboard
var day: Int

The day. Valid values 1..31

Link copied to clipboard

Get the day of the week. Valid values 1..7 (1 being Sunday).

Link copied to clipboard
val epoch: Long

Number of milliseconds that have passed since 1970-01-01T00:00:00.

Link copied to clipboard
var hour: Int

The hour. Valid values 0..23

Link copied to clipboard

Number of milliseconds that have passed since 1970-01-01T00:00:00.

Link copied to clipboard

The millisecond. Valid values 0..999

Link copied to clipboard
var minute: Int

The minute. Valid values 0..59

Link copied to clipboard
var month: Int

The month. Valid values 1..12

Link copied to clipboard
var second: Int

The second. Valid values 0..59

Link copied to clipboard
var year: Int

The year

Functions

Link copied to clipboard
external fun asLong(): Long

Number of milliseconds that have passed since 1970-01-01T00:00:00.

Link copied to clipboard
external fun assign(value: Time)

Assign new value for this Time instance.

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard
external fun fromLong(timestamp: Long)

Sets the time from a timestamp. Timestamp is the number of milliseconds that have passed since 1970-01-01T00:00:00.

Link copied to clipboard
external fun fromStr(str: String, utcTime: Boolean)

Set time object from an ISO8601 string

Link copied to clipboard

True if keeps a reference to a C++ SDK object False if keeps a C++ SDK object

Link copied to clipboard
external fun isValid(): Boolean

Check if the date is valid.

Link copied to clipboard
external fun milliSecondSleep(msec: Long)

Sleep in this thread for specified number of milliseconds.

Link copied to clipboard
operator fun not(): Boolean

Checks if this object is valid.

Link copied to clipboard
fun release()

Releases the native referenced value of this object if:

Link copied to clipboard
external fun reset()

Resets time to invalid.

Link copied to clipboard
external fun setLocalTime()

Set this instance to local time.

Link copied to clipboard
external fun setUniversalTime()

Set this instance to universal time.

Link copied to clipboard
external fun toStr(utcTime: Boolean): String?

Format string conform to ISO8601