import i18n from "../lang"; // internationalization
function weekDay (time) {
    const weekNum = new Date(time).getDay();
    let week = "";
    switch (weekNum) {
        case 0:
            week = i18n.t('productDetails.sunday');
            break;
        case 1:
            week = i18n.t('productDetails.monday');
            break;
        case 2:
            week = i18n.t('productDetails.tuesday');
            break;
        case 3:
            week = i18n.t('productDetails.wednesday');
            break;
        case 4:
            week = i18n.t('productDetails.thursday');
            break;
        case 5:
            week = i18n.t('productDetails.friday');
            break;
        case 6:
            week = i18n.t('productDetails.saturday');
            break;
    }
    return week;
};
export default weekDay;