MomentJS - Minutes



This method will give the no of minutes in the duration. The value returned will be between 0-59. If you want proper length of minutes in that duration make use of moment.duration().asMinutes().

Syntax

moment.duration().minutes();
moment.duration().asMinutes();

Example

var m = moment.duration(500, "minutes").minutes();
var asmins = moment.duration(500, "minutes").asMinutes();

Output

Minutes
momentjs_durations.htm
Advertisements