Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript get all days of week

var curr = new Date; // get current date
var first = curr.getDate() - curr.getDay();//to set first day on monday, not on sunday, first+1 :

var firstday = (new Date(curr.setDate(first+1))).toString();

for(var i = 1;i<7;i++){
var next = first + i;
var nextday = (new Date(curr.setDate(next))).toString();
alert(nextday);
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: Using Regular Expressions (regex) to Print JavaScript Number Format with Commas 
Javascript :: searching in json array mongodb 
Javascript :: namespace in javascript 
Javascript :: fs.readfile 
Javascript :: Difference in push and navigate in react Navigation 
Javascript :: javascript regex single line 
Javascript :: how to remove property from object javascript 
Javascript :: replace jquery 
Javascript :: leap year function javascript 
Javascript :: discord.js start code 
Javascript :: javascript remove all element in array 
Javascript :: js fetch api 
Javascript :: change focus to next field jquery after enter 
Javascript :: react-native-config 
Javascript :: filter repetition multidimensional array javascript 
Javascript :: xmlhttprequest js 
Javascript :: img src to file javascript 
Javascript :: how to make a popup in javascript -html 
Javascript :: js if else 
Javascript :: concatenate multiple arrays javascript 
Javascript :: change property in array of objects javascript 
Javascript :: what is div in javascript 
Javascript :: Could not find a production build in the 
Javascript :: how to use saved image on react 
Javascript :: How to get the background image URL of an element using jQuery 
Javascript :: jqery first img src 
Javascript :: javasript array indexof 
Javascript :: python parse single quote json 
Javascript :: jquery not readonly 
Javascript :: Data Down Action Up React 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =