Layout Options

  • Fixed Header
    Makes the header top fixed, always visible!
  • Fixed Sidebar
    Makes the sidebar left fixed, always visible!

Description

The getDay() method returns the day of the week (from 0 to 6) for the specified date, according to local time. Sunday is 0, Monday is 1, etc.

This method has the form:

Date.getDay()

Examples

The following example shows the basic use of this method.

<script>
var d = new Date();
document.write(d.getDay());
</script>

This produces the following result:

Browser Support

Firefox IE Chrome Opera Safari