copy

Returns a copy of this date with the values of any individual components replaced by the new values specified.

fun copy(year: Int, month: Month, dayOfMonth: Int): Date
fun copy(year: Int, monthNumber: Int, dayOfMonth: Int): Date
fun copy(year: Int, dayOfYear: Int): Date