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() *
const moment = require('moment')
var date = new Date()
console.log(date) // 2018-11-09T10:01:33.131Z
// 1.
console.log( 'object', moment(new Date()).toObject() )
// { years: 2018,
// months: 10,
// date: 9,
// hours: 13,
// minutes: 1,
// seconds: 33,
// milliseconds: 135 }
// 2.
console.log( 'array', moment(new Date()).toArray() ) // array [ 2018, 10, 9, 13, 1, 33, 141 ]
// 3.
console.log( 'year', moment(new Date()).toObject().years ) // year 2018
console.log( 'day of month', moment(new Date()).toObject().date ) // day of month 9
console.log( 'hours', moment(new Date()).toObject().hours ) // hours 13
console.log( 'minutes', moment(new Date()).toObject().minutes ) // minutes 1
console.log( 'seconds', moment(new Date()).toObject().seconds ) // seconds 33
console.log( 'milliseconds', moment(new Date()).toObject().milliseconds ) // milliseconds 139
// 4.
console.log( 'weeks', moment(new Date()).weeks() ) // weeks 45
console.log( 'day of week', moment(new Date()).days() ) // day of week 5
console.log( 'day of month', moment(new Date()).date() ) // day of month 9
console.log( 'hours', moment(new Date()).hours() ) // hours 13
console.log( 'minutes', moment(new Date()).minutes() ) // minutes 1
console.log( 'seconds', moment(new Date()).seconds() ) // seconds 33
console.log( 'milliseconds', moment(new Date()).milliseconds() ) // milliseconds 141