//core/io.islandtime/OffsetDateTime/copy
copy¶
common
fun copy(dateTime: DateTime = this.dateTime, offset: UtcOffset = this.offset): OffsetDateTime
fun copy(date: Date = this.date, time: Time = this.time, offset: UtcOffset = this.offset): OffsetDateTime
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): OffsetDateTime
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): OffsetDateTime
Returns a copy of this date-time with the values of any individual components replaced by the new values specified.
Throws¶
DateTimeException | if the resulting date-time is invalid |