JavaScript Get Date Methods

Free Web development courses with real-time projects Start Now!!

Program 1

<html>
    <head><title>Java Script date Demo</title>
       <script language="javascript">
          var d= new Date()
          var myday=d.getDay()
          switch(myday)
          {
            case 0: document.write( "Wow its cool Sunday"); break
            case 1: document.write("Moday its first working day "); break
            case 2: document.write("Tuesday Meeting with HR "); break
            case 3: document.write("Wed Meeting with CSE Team"); break
            case 4: document.write("Thursday Plan to go for meeting with other compnay"); break
            case 5: document.write(" Friday: Last working day of week"); break
            case 6: document.write("Super Saturday"); break
            default:document.write("Oops invalid value")
          }
        </script>
    </head>
        <body>
        </body>
</html>

 

Your 15 seconds will encourage us to work even harder
Please share your happy experience on Google

courses

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply

Your email address will not be published. Required fields are marked *