angularjs - Adding additional day in array to correct date format in angular -


in angular project, have array this:

thali : [   {"date":"2017-04-09t18:30:00.000z","isholiday":"100"},   {"date":"2017-04-10t18:30:00.000z","isholiday":"101"} ] 

from date picker selected first value 2017-04-10 (10 april) , in isodate format shows 1 day less. need add 1 day in date array. how can add 1 day in dates of array or able change format of isodate?

here solution using pure javascript

var arr = [    {"date":"2017-04-09t18:30:00.000z","isholiday":"100"},    {"date":"2017-04-10t18:30:00.000z","isholiday":"101"}  ]    arr.foreach(function(entry) {  	var d = new date(entry["date"]);  	// add 1 day  	d.setdate(d.getdate() + 1);      // replace existing date in array new 1  	entry["date"] = d.toisostring()  })    console.log(arr);


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -