function getCurrentDayName() {
const currentDate = new Date();
//
// Day must start with monday
const days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
const currentDay = days[currentDate.getDay() - 1];
return currentDay;
}
Created
June 22, 2022 03:38
-
-
Save rifayetuxbd/1b4613c2f5ff74574d02b08c343b3a53 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment