core / io.islandtime.ranges / toZonedDateTimeInterval

toZonedDateTimeInterval

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) fun OffsetDateTimeInterval.toZonedDateTimeInterval(zone: TimeZone, strategy: OffsetConversionStrategy): ZonedDateTimeInterval

Converts this interval to a ZonedDateTimeInterval using the specified strategy to adjust each endpoint to a valid date, time, and offset in zone.

Alternatively, you can use asZonedDateTimeInterval to convert each endpoint to a ZonedDateTime with an equivalent fixed-offset zone. However, this comes with the caveat that a fixed-offset zone lacks knowledge of any region and will not respond to daylight savings time changes.

See Also

asZonedDateTimeInterval

(iosArm64, iosX64, jvm, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86) fun DateRange.toZonedDateTimeInterval(zone: TimeZone): ZonedDateTimeInterval
Deprecated: Use 'at' instead.

Convert a range of dates into a ZonedDateTimeInterval between the starting and ending instants in a particular time zone.