JavaScript Tutorial/Date/getDay

Материал из Web эксперт
Перейти к: навигация, поиск

Date.getDay() with switch statement

   <source lang="javascript">

<html>

   <script language="JavaScript">
   
   </script>
   </html></source>
   
  

Get day from a date

   <source lang="javascript">

<html> <head> <title>A Simple Page</title> <script language="JavaScript">

</script> </head> <body> </body> </html></source>


Translate the Date().getDay() to a string day name

The getDay() method returns the day of the week expressed as an integer from 0 (Sunday) to 6 (Saturday).

The following example uses the getDate() Method to Return the Day of the Week



   <source lang="javascript">

<html> <head> <title>Convert Day of the Week</title> </head> <body> <script language="JavaScript" type="text/javascript">

</script> </body> </html></source>