Closed michellelockett closed 6 years ago
can call asMinutes() on the duration object to convert to minutes:
https://momentjs.com/docs/#/durations/minutes/
can retrieve from database and send back to client in readable form by calling the humanize method:
moment.duration(2, "minutes").humanize(); // 2 minutes
momentjs duration object
moment.duration({ seconds: 2, minutes: 2, hours: 2, days: 2, weeks: 2, months: 2, years: 2 });