const today = new Date(); const date = today.getDate().toString(); const month = (today.getMonth() + 1).toString(); const hours = today.getHours(); const minutes = today.getMinutes().toString(); const dateObj = { date: `${date.length < 2 ? "0" : ""}${date}/${ month.length < 2 ? "0" : "" }${month}/${today.getFullYear().toString().slice(2)}`, time: `${ hours > 12 ? "0" + (hours - 12).toString() : hours === 12 ? 12 : "0" + hours.toString() }:${minutes.length < 2 ? "0" : ""}${minutes}${hours >= 12 ? "PM" : "AM"}`, }; module.exports = (logoURL, lineImg, cart, totalCost, name, email) => { let cartItems = ""; for (index in cart) { cartItems += ` ${cart[index].quantity} ${cart[index].sellingPrice} `; } const line = `dashed-line`; return `
`; };