var period = require("period");
console.log(period(3600).getLength()); // 1
console.log(period(3600).getSingular()); // "hour"
console.log(period(3600).getPlural()); // "hours"
console.log(period(24, "hour").getLength()); // 1
console.log(period(24, "hour").getSingular()); // "day"
console.log(period(7, "day").getLength()); // 1
console.log(period(7, "day").getPlural()); // "weeks"
This repository has been archived by the owner on Jul 12, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
howsecureismypassword/modules-period
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|