function convertDate(date) {
    let output = '';

    // hour
    if (date.getHours() > 12) {