//core/io.islandtime/ZonedDateTime/copy
copy¶
common
fun copy(dateTime: DateTime = this.dateTime, offset: UtcOffset = this.offset, zone: TimeZone = this.zone): ZonedDateTime
fun copy(date: Date = this.date, time: Time = this.time, offset: UtcOffset = this.offset, zone: TimeZone = this.zone): ZonedDateTime
fun copy(year: Int = this.year, dayOfYear: Int, hour: Int = this.hour, minute: Int = this.minute, second: Int = this.second, nanosecond: Int = this.nanosecond, offset: UtcOffset = this.offset, zone: TimeZone = this.zone): ZonedDateTime
fun copy(year: Int = this.year, month: Month = this.month, dayOfMonth: Int = this.dayOfMonth, hour: Int = this.hour, minute: Int = this.minute, second: Int = this.second, nanosecond: Int = this.nanosecond, offset: UtcOffset = this.offset, zone: TimeZone = this.zone): ZonedDateTime
fun copy(year: Int = this.year, monthNumber: Int, dayOfMonth: Int = this.dayOfMonth, hour: Int = this.hour, minute: Int = this.minute, second: Int = this.second, nanosecond: Int = this.nanosecond, offset: UtcOffset = this.offset, zone: TimeZone = this.zone): ZonedDateTime
Returns a copy of this date-time with the values of any individual components replaced by the new values specified.
If the new date falls within a daylight savings time gap, it will be adjusted forward by the length of the gap. If it falls within an overlap, the offset value will be used if possible. The time zone takes precedence over the offset, so any provided offset value will be ignored if it is invalid within the current region.
Throws¶
DateTimeException | if the resulting date-time is invalid |