core / io.islandtime.darwin

Package io.islandtime.darwin

Various extensions specifically for the Apple platform.

Functions

(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandDate

Convert an NSDateComponents object to an Island Time Date.

fun <ERROR CLASS>.toIslandDate(): Date
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandDateTime

Convert an NSDateComponents object to an Island Time DateTime.

fun <ERROR CLASS>.toIslandDateTime(): DateTime
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandDateTimeAt

Convert an NSDate to an Island Time DateTime at the specified UTC offset.

fun <ERROR CLASS>.toIslandDateTimeAt(offset: UtcOffset): DateTime

Convert an NSDate to an Island Time DateTime at the specified time zone.

fun <ERROR CLASS>.toIslandDateTimeAt(nsTimeZone: <ERROR CLASS>): <ERROR CLASS>
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandInstant

Convert an NSDate to an Island Time Instant.

fun <ERROR CLASS>.toIslandInstant(): Instant
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandInstantInterval

Convert to an equivalent Island Time InstantInterval.

fun <ERROR CLASS>.toIslandInstantInterval(): InstantInterval
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandOffsetDateTime

Convert an NSDateComponents object to an Island Time OffsetDateTime.

fun <ERROR CLASS>.toIslandOffsetDateTime(): Nothing
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandOffsetDateTimeAt

Convert an NSDate to an Island Time OffsetDateTime at the specified UTC offset.

fun <ERROR CLASS>.toIslandOffsetDateTimeAt(offset: UtcOffset): OffsetDateTime

Convert an NSDate to an Island Time OffsetDateTime at the specified time zone.

fun <ERROR CLASS>.toIslandOffsetDateTimeAt(nsTimeZone: <ERROR CLASS>): OffsetDateTime
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandOffsetDateTimeOrNull

Convert an NSDateComponents object to an Island Time OffsetDateTime or null if the timeZone property is absent.

fun <ERROR CLASS>.toIslandOffsetDateTimeOrNull(): OffsetDateTime?
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandTime

Convert an NSDateComponents object to an Island Time Time.

fun <ERROR CLASS>.toIslandTime(): Time
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandTimeZone

Convert an NSTimeZone` to an Island Time TimeZone with the same identifier.

fun <ERROR CLASS>.toIslandTimeZone(): TimeZone
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandUtcOffset

fun <ERROR CLASS>.toIslandUtcOffset(): UtcOffset
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandUtcOffsetAt

Convert an NSTimeZone to an Island Time UtcOffset at the provided date.

fun <ERROR CLASS>.toIslandUtcOffsetAt(date: <ERROR CLASS>): UtcOffset
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandZonedDateTime

Convert an NSDateComponents object to an Island Time ZonedDateTime.

fun <ERROR CLASS>.toIslandZonedDateTime(): Nothing
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandZonedDateTimeAt

Convert an NSDate to an Island Time ZonedDateTime at the specified time zone.

fun <ERROR CLASS>.toIslandZonedDateTimeAt(zone: TimeZone): ZonedDateTime
fun <ERROR CLASS>.toIslandZonedDateTimeAt(nsTimeZone: <ERROR CLASS>): <ERROR CLASS>
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toIslandZonedDateTimeOrNull

Convert an NSDateComponents object to an Island Time ZonedDateTime or null if the timeZone property is absent.

fun <ERROR CLASS>.toIslandZonedDateTimeOrNull(): ZonedDateTime?
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toNSDate

Convert an Island Time TimePoint to an NSDate.

fun <T> TimePoint<T>.toNSDate(): <ERROR CLASS>
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toNSDateComponents

Convert an Island Time Year to an equivalent NSDateComponents object.

fun Year.toNSDateComponents(includeCalendar: Boolean = false): <ERROR CLASS>

Convert an Island Time YearMonth to an equivalent NSDateComponents object.

fun YearMonth.toNSDateComponents(includeCalendar: Boolean = false): <ERROR CLASS>

Convert an Island Time Date to an equivalent NSDateComponents object.

fun Date.toNSDateComponents(includeCalendar: Boolean = false): <ERROR CLASS>

Convert an Island Time Time to an equivalent NSDateComponents object.

fun Time.toNSDateComponents(includeCalendar: Boolean = false): <ERROR CLASS>

Convert an Island Time DateTime to an equivalent NSDateComponents object.

fun DateTime.toNSDateComponents(includeCalendar: Boolean = false): <ERROR CLASS>

Convert an Island Time OffsetTime to an equivalent NSDateComponents object.

fun OffsetTime.toNSDateComponents(includeCalendar: Boolean = false): <ERROR CLASS>

Convert an Island Time OffsetDateTime to an equivalent NSDateComponents object.

fun OffsetDateTime.toNSDateComponents(includeCalendar: Boolean = false): <ERROR CLASS>

Convert an Island Time ZonedDateTime to an equivalent NSDateComponents object.

fun ZonedDateTime.toNSDateComponents(includeCalendar: Boolean = false): <ERROR CLASS>
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toNSDateInterval

Convert to an equivalent NSDateInterval.

fun <T : TimePoint<T>> TimePointInterval<T>.toNSDateInterval(): <ERROR CLASS>
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toNSDateIntervalOrNull

Convert to an equivalent NSDateInterval or null if the interval is unbounded.

fun <T : TimePoint<T>> TimePointInterval<T>.toNSDateIntervalOrNull(): <ERROR CLASS>?
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toNSTimeInterval

Convert to an equivalent NSTimeInterval.

fun Duration.toNSTimeInterval(): <ERROR CLASS>
fun IntDays.toNSTimeInterval(): <ERROR CLASS>
fun LongDays.toNSTimeInterval(): <ERROR CLASS>
fun IntHours.toNSTimeInterval(): <ERROR CLASS>
fun LongHours.toNSTimeInterval(): <ERROR CLASS>
fun IntMinutes.toNSTimeInterval(): <ERROR CLASS>
fun LongMinutes.toNSTimeInterval(): <ERROR CLASS>
fun IntSeconds.toNSTimeInterval(): <ERROR CLASS>
fun LongSeconds.toNSTimeInterval(): <ERROR CLASS>
fun IntMilliseconds.toNSTimeInterval(): <ERROR CLASS>
fun LongMilliseconds.toNSTimeInterval(): <ERROR CLASS>
fun IntMicroseconds.toNSTimeInterval(): <ERROR CLASS>
fun LongMicroseconds.toNSTimeInterval(): <ERROR CLASS>
fun IntNanoseconds.toNSTimeInterval(): <ERROR CLASS>
fun LongNanoseconds.toNSTimeInterval(): <ERROR CLASS>
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toNSTimeZone

Convert an Island Time UtcOffset into an equivalent NSTimeZone with a fixed UTC offset.

fun UtcOffset.toNSTimeZone(): <ERROR CLASS>

Convert an Island Time TimeZone to an NSTimeZone.

fun TimeZone.toNSTimeZone(): <ERROR CLASS>
(iosArm64, iosX64, macosX64, tvosArm64, tvosX64, watchosArm64, watchosX86)

toNSTimeZoneOrNull

Convert an Island Time TimeZone to an NSTimeZone or null if the identifier isn't recognized as valid for an NSTimeZone.

fun TimeZone.toNSTimeZoneOrNull(): <ERROR CLASS>?