iso to date javascript
date = new Date('2013-08-03T02:00:00Z');
year = date.getFullYear();
month = date.getMonth()+1;
dt = date.getDate();
if (dt < 10) {
dt = '0' + dt;
}
if (month < 10) {
month = '0' + month;
}
console.log(year+'-' + month + '-'+dt);date = new Date('2013-03-10T02:00:00Z');
date.getFullYear()+'-' + (date.getMonth()+1) + '-'+date.getDate();//prints expected format.
Also in JavaScript:
- add new key value pair to object javascript
- get epoch timestamp js
- javascript append to html table tr
- how to check string uppercase or lowersace using regex javascript
- javascript update text in div
- javascript json trypass
- crypto node
- colors in node js console
- onclick timer javascript
- filter
- how do i listen to a keypress in javascript
- javascript hasownproperty
- javascript callback function
- how to set time out in js
- how to change checkbox state in jquery
- javascript base 10 to base 2
- to uppercase javascript
- not equal to in js
- js stop form submit on enter
- how to get href value of anchor tag in jquery
- data type angular
- get a user input react
- loop key in object
- angular get current route