Skip to content

durationFromTemporal

durationFromTemporal(duration, relativeTo?): Duration

Defined in: duration.ts:283

Convert a Temporal.Duration to a google.protobuf.Duration message. Optionally accepts a relativeTo argument to balance the duration. The relativeTo argument can be any value that can be passed to the relativeTo parameter for Temporal.Duration.round(). The default is the current time.

Duration

string | PlainDateTime | ZonedDateTime | PlainDateTimeLike | ZonedDateTimeLike

Duration