Converts a Date object to a string in the format yyyy-mm-dd
The Date object to format
A string in yyyy-mm-dd format
const date = new Date('2025-11-15T12:30:00');formatDateToYYYYMMDD(date); // Returns "2025-11-15" Copy
const date = new Date('2025-11-15T12:30:00');formatDateToYYYYMMDD(date); // Returns "2025-11-15"
Converts a Date object to a string in the format yyyy-mm-dd