Typescript timestamp get milliseconds -


in typescript project response containing timestamps looks this:

  • +049235-10-18t04:13:50.000z

this timestamp can convert localestring looks this:

  • 7.4.2017, 14:29:17

i want difference between 2 timestamps in seconds. time differrence between 2 timestamps can few seconds or days. there solution in typescript?

use moment.js (http://momentjs.com/)

moment().subtract(object); 

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -