/**
 * Function to format date in 'YYYY-MM-DDTHH:MM' format
 * @param date {Date} - Date to format
 */
function formatDatetimeInput(date) {
    let year = date.getFullYear();
    let month = String(date.getMonth() + 1).padStart(2, '0');
    let day = String(date.getDate()).padStart(2, '0');
    let hours = String(date.getHours()).padStart(2, '0');
    let minutes = String(date.getMinutes()).padStart(2, '0');

    return `${year}-${month}-${day}T${hours}:${minutes}`;
}

/**
 * Function to format date in 'YYYY-MM-DD' format
 * @param date {Date} - Date to format
 */
function formatDateInput(date) {
    let year = date.getFullYear();
    let month = String(date.getMonth() + 1).padStart(2, '0');
    let day = String(date.getDate()).padStart(2, '0');

    return `${year}-${month}-${day}`
}
