Skip to content

🧪 Time

A time (without a date).

Parameters:

Name Type Description Default
hour Int The hour. Must be between 0 and 23. -
minute Int The minute. Must be between 0 and 59. -
second Int The second. Must be between 0 and 59. -
microsecond Int The microsecond. Must be between 0 and 999,999. 0
Stub code in Time.sdsstub

@Experimental
@PythonName("time")
class Time(
    const hour: Int,
    const minute: Int,
    const second: Int,
    const microsecond: Int = 0
) where {
    hour >= 0,
    hour <= 23,
    minute >= 0,
    minute <= 59,
    second >= 0,
    second <= 59,
    microsecond >= 0,
    microsecond <= 999999
} {
    /**
     * The hour.
     */
    attr hour: Int

    /**
     * The minute.
     */
    attr minute: Int

    /**
     * The second.
     */
    attr second: Int

    /**
     * The microsecond.
     */
    attr microsecond: Int
}

hour

The hour.

Type: Int

microsecond

The microsecond.

Type: Int

minute

The minute.

Type: Int

second

The second.

Type: Int