setDate

fun setDate(date: Int): Int(source)

Sets the numeric day-of-the-month value of the Date object using local time.

Parameters

date

A numeric value equal to the day of the month.

MDN Reference