js date now week code example

Example 1: get date one week from now javascript

function nextweek(){
    var today = new Date();
    var nextweek = new Date(today.getFullYear(), today.getMonth(), today.getDate()+7);
    return nextweek;
}

Example 2: new date getday js

Date.getDay()
// Javascript date getDay() method returns the day of the week for the specified
// date according to local time. The value returned by getDay() is an integer 
// corresponding to the day of the week: 0 for Sunday, 1 for Monday, 2 for Tuesday, and so on.

Tags:

Sql Example