![]() |
The Duration plugin makes it possible to add a lot of formatting options to Moment Durations of the Moment.js JavaScript date library. This will make it possible to describe a duration as required by the user. Write the below command in the terminal to install Duration Format Plugin: npm install moment-duration-format ![]()
The following are some of the functions in this plugin:
The below examples will help to understand some of the methods of the Duration Format Plugin. Example 1: Javascript
Output: ![]()
Example 2: Javascript
Output: ![]()
Reference: https://momentjs.com/docs/#/plugins/duration-format/ |
Reffered: https://www.geeksforgeeks.org
Node.js |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 11 |