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
Post a Comment