(function () {
function ordinal(day) {
if (day > 3 && day < 21) return "th";
switch (day % 10) {
case 1: return "st";
case 2: return "nd";
case 3: return "rd";
default: return "th";
}
}
const now = new Date();
const weekday = now.toLocaleDateString('en-US', { weekday: 'long' });
const month = now.toLocaleDateString('en-US', { month: 'long' });
const day = now.getDate();
const year = now.getFullYear();
document.getElementById('today').textContent =
Today is ${weekday}, ${month} ${day}${ordinal(day)}, ${year};
})();