Skip to content

🧪 Duration

A duration.

Parameters:

Name Type Description Default
weeks Int The number of weeks. 0
days Int The number of days. 0
hours Int The number of hours. 0
minutes Int The number of minutes. 0
seconds Int The number of seconds. 0
milliseconds Int The number of milliseconds. 0
microseconds Int The number of microseconds. 0
Stub code in Duration.sdsstub

@Experimental
@PythonName("timedelta")
class Duration(
    weeks: Int = 0,
    days: Int = 0,
    hours: Int = 0,
    minutes: Int = 0,
    seconds: Int = 0,
    milliseconds: Int = 0,
    microseconds: Int = 0
) {
    /**
     * The number of full days.
     */
    @PythonName("days")
    attr fullDays: Int

    /**
     * The remaining seconds after subtracting the days.
     */
    @PythonName("seconds")
    attr remainingSeconds: Int

    /**
     * The remaining microseconds after subtracting the days and seconds.
     */
    @PythonName("microseconds")
    attr remainingMicroseconds: Int
}

fullDays

The number of full days.

Type: Int

remainingMicroseconds

The remaining microseconds after subtracting the days and seconds.

Type: Int

remainingSeconds

The remaining seconds after subtracting the days.

Type: Int