javascript
function getDate() {
const week = new Array('SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY', 'SATURDAY');
const today = new Date();
const dayName = week[today.getDay()];
const hours = today.getHours() % 12 ? today.getHours() % 12 : 12;
const minutes = today.getMinutes() < 10 ? '0' + today.getMinutes() : today.getMinutes();
const ampm = today.getHours() >= 12 ? 'PM' : 'AM';
const date = `${dayName} ${hours}:${minutes} ${ampm}`;
return date;
}