Moment JS
Moment JS is a great Javascript library for web developers to convert dates
Usage
//Local time var m1 = new moment(); var localYear = m1.year(); var localMonth = m1.month(); var localDate = m1.date(); //Day of month var localDay = m1.day(); //Day of week var localHour = m1.hour(); var localMinute = m1.minute(); var localSecond = m1.second(); var isoStr = m1.toISOString(); //UTC var mUtc = moment.utc(); //Get current UTC timestamp var mUtc2 = moment.utc('2018-08-20T08:03:26.617Z'); //UTC timestamp string //Convert UTC moment to user's timezone settings: var mLoc = mUtc.local(); var localYear = mLoc.year(); var localMonth = mLoc.month(); var localDate = mLoc.date(); //Day of month var localDay = mLoc.day(); //Day of week var localHour = mLoc.hour(); var localMinute = mLoc.minute(); var localSecond = mLoc.second();