160
rated 0 times
[
163]
[
3]
/ answers: 1 / hits: 80126
/ 10 Years ago, sun, may 4, 2014, 12:00:00
I need to convert hours and minutes in minutes values. With pure JavaScript Date object I do the following:
var d = new Date();
var minutes = d.getHours() * 60 + d.getMinutes();
I've just switched to moment.js and looking for better solution likes the following:
var minutes = moment(new Date()).toMinutes()
Is there is something like this?
More From » date