Thank you so very much :-) Yes it was.... :-D
I did it like this below :
function getDayName() {
var myDate= document.getElementById("dateInput").value;
if(myDate == ""){
document.getElementById("result").innerHTML = "Invalid date. Please enter a date in dd/mm/yyyy fomat"
}
else...
The function below calculates the day of the week for any given date. It currently is not returning the correct day.
The function is not working correctly. Fix it to return the correct day. <strong>Test cases: 26/07/1969 = Saturday
Also please update the function to print the day and month...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.