I try the following to get a timespan in milliseconds:
moment(0).minute(10).milliseconds()
The idea is to have a simple and readable way to convert timespans into milliseconds. But unfortunately this will always return 0
, the initial time.
I try the following to get a timespan in milliseconds:
moment(0).minute(10).milliseconds()
The idea is to have a simple and readable way to convert timespans into milliseconds. But unfortunately this will always return 0
, the initial time.
2 Answers
Reset to default 7I think this is what you actually want to do:
moment.duration(10, "minutes").asMilliseconds();
I don't know if I got your question, but we can use JavaScript for timestamps
var start = new Date().getTime();
var elapsed = new Date().getTime() - start;
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742298560a4417609.html
评论列表(0条)