MomentJS - Weeks


Advertisements

This method will the week details from a duration. To get the length of duration in weeks use moment.duration().asWeeks()method.

Syntax

moment.duration().weeks();
moment.duration().asWeeks();

Example

var m = moment.duration(500, "weeks").weeks();
var asmins = moment.duration(500, "weeks").asWeeks();

Output

Weeks
momentjs_durations.htm
Advertisements