Sets the day of the month and returns a new Date instance.
The original date.
The day of the month to set.
A new Date with the updated day.
setDay(new Date('2025-01-01'), 15); // → 2025-01-15 Copy
setDay(new Date('2025-01-01'), 15); // → 2025-01-15
Sets the day of the month and returns a new Date instance.