Duration
class Duration(val years: Int = definedExternally, val months: Int = definedExternally, val weeks: Int = definedExternally, val days: Int = definedExternally, val hours: Int = definedExternally, val minutes: Int = definedExternally, val seconds: Int = definedExternally, val milliseconds: Int = definedExternally, val microseconds: Int = definedExternally, val nanoseconds: Int = definedExternally) : HasDurationOperations<Duration, DurationArithmeticOptions> , Localizable<DateTimeFormatOptions> (source)
A Temporal.Duration
represents an immutable duration of time which can be used in date/time arithmetic.
See https://tc39.es/proposal-temporal/docs/duration.html for more details.
Constructors
Link copied to clipboard
constructor(years: Int = definedExternally, months: Int = definedExternally, weeks: Int = definedExternally, days: Int = definedExternally, hours: Int = definedExternally, minutes: Int = definedExternally, seconds: Int = definedExternally, milliseconds: Int = definedExternally, microseconds: Int = definedExternally, nanoseconds: Int = definedExternally)
Types
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns a value as a string value appropriate to the host environment's current locale.
open fun toLocaleString(locales: ReadonlyArray<UnicodeBCP47LocaleIdentifier>, options: DateTimeFormatOptions): String
open fun toLocaleString(locales: UnicodeBCP47LocaleIdentifier, options: DateTimeFormatOptions): String
Converts a value to a string by using the current or specified locale.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard