Coelacanths / skillsource

0 stars 2 forks source link

When creating a course, the creator should estimate the time for each step #1

Closed michellelockett closed 6 years ago

michellelockett commented 6 years ago

momentjs duration object

moment.duration({ seconds: 2, minutes: 2, hours: 2, days: 2, weeks: 2, months: 2, years: 2 });

michellelockett commented 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