Milliseconds
Insanely lightweight module for converting times to milliseconds.
Install / Use
/learn @HenrikJoreteg/MillisecondsREADME
milliseconds
Insanely lightweight module for converting times to milliseconds.
Literally 9 lines of code, it's just to make writing time in a way that's more readable without having to remember how many milliseconds are in a day, week, month, year.
For those curious, the exact definition of "years" and "months" can vary slighly but these are based on the Julian Year which is 365.25 days of 86400 seconds (http://en.wikipedia.org/wiki/Year) and a month is simply 1/12th of that.
install
npm install milliseconds
example
var ms = require('milliseconds');
ms.seconds(2); // 2000
ms.minutes(2); // 120000
ms.hours(2); // 7200000
ms.days(2); // 172800000
ms.weeks(2); // 1209600000
ms.months(2); // 5259600000
ms.years(2); // 63115200000
credits
If you like this follow @HenrikJoreteg on twitter.
license
MIT
Related Skills
node-connect
347.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
