//core/io.islandtime/Date/copy
copy¶
common
fun copy(year: Int = this.year, month: Month = this.month, dayOfMonth: Int = this.day): Date
fun copy(year: Int = this.year, monthNumber: Int, dayOfMonth: Int = this.day): Date
fun copy(year: Int = this.year, dayOfYear: Int): Date
Returns a copy of this date with the values of any individual components replaced by the new values specified.
Throws¶
DateTimeException | if the resulting date is invalid |