how to find the day of any date in javascript

<html>
<head>
    <title>webdeveloper</title>
</head>
<body>
    <script type="text/javascript">
        var prompt("ENTER DATE MM DD YYY");
        var dt = new Date(a);
        switch (dt.getDay())
        {
            case 0:
                
day "Sunday";                 break;             case 1:                 day "Monday";                 break;             case 2:                 day "Tuesday";                 break;             case 3:                 day "wednesday";                 break;             case 4:                 day "Thursday"                 break;             case 5:                 day "friday";                 break;             case 6:                 day "Satureday";                break;         }         document.write(day);     </script> </body> </html

Post a Comment

0 Comments