- Notifications
You must be signed in to change notification settings - Fork2
Tiny milisecond conversion utility. Ported fromhttps://npmjs.com/ms
License
NotificationsYou must be signed in to change notification settings
denolib/ms
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Use this package to easily convert various time formats to milliseconds.It is ported fromhttps://github.com/zeit/ms to work withDeno. Ported mainly for use in portingdebug.
import{ms}from"https://raw.githubusercontent.com/denolib/ms/master/ms.ts";ms('2 days')// 172800000ms('1d')// 86400000ms('10h')// 36000000ms('2.5 hrs')// 9000000ms('2h')// 7200000ms('1m')// 60000ms('5s')// 5000ms('1y')// 31557600000ms('100')// 100ms('-3 days')// -259200000ms('-1h')// -3600000ms('-200')// -200
ms(60000)// "1m"ms(2*60000)// "2m"ms(-3*60000)// "-3m"ms(ms('10 hours'))// "10h"
ms(60000,{long:true})// "1 minute"ms(2*60000,{long:true})// "2 minutes"ms(-3*60000,{long:true})// "-3 minutes"ms(ms('10 hours'),{long:true})// "10 hours"
About
Tiny milisecond conversion utility. Ported fromhttps://npmjs.com/ms
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.