const notify = (msg, type) => {
    if(msg && type) {
        alertify.set('notifier','position', 'top-right');
        alertify.notify(msg, type);        
    }
}

const dateFormat = (dateString) => {
    if(!dateString) {
        return dateString;
    }
    const date = new Date(dateString); 

    //const formatter = new Intl.DateTimeFormat('en-GB', { month: '2-digit', day: '2-digit', year: 'numeric' });
    //const formattedDate = formatter.format(date);

    const formatter = new Intl.DateTimeFormat('en-US', { 
        day: '2-digit', 
        month: '2-digit', 
        year: 'numeric'
    });

    return formatter.format(date);
}
const dateTimeFormat = (dateString) => {
    if(!dateString) {
        return dateString;
    }
    const date = new Date(dateString); 

    //const formatter = new Intl.DateTimeFormat('en-Gb', { month: '2-digit', day: '2-digit', year: 'numeric' });
    //const formattedDate = formatter.format(date);

    const formatter = new Intl.DateTimeFormat('en-US', { 
        day: '2-digit', 
        month: '2-digit', 
        year: 'numeric',
        hour: "numeric",
        minute: "numeric",
        hour12: false, 
    });

    return formatter.format(date);
}