Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including pico-ms with all npm packages installed. Try it out:

var picoMs = require("pico-ms")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

pico-ms v1.1.1

Incy wincy millisecond converter for hours, minutes, or seconds

pico-ms NPM version js-standard-style Dependency Status

Incy wincy millisecond converter for days, hours, minutes, or seconds


$ npm install --save pico-ms


const picoMs = require('pico-ms')
picoMs('3600s') // 3600000
picoMs('3600 sec') // 3600000
picoMs('3600 seconds') // 3600000
picoMs('60m') // 3600000
picoMs('60 mins') // 3600000
picoMs('60 minutes') // 3600000
picoMs('1h') // 3600000
picoMs('1hr') // 3600000
picoMs('1 hour') // 3600000
picoMs(`${1 / 24} days`) // 3600000
picoMs(3600000) // 3600000
picoMs('3600000') // 3600000


Takes human readable days, hour, minute, or second string and returns milliseconds

const picoMs = require('pico-ms')(*hms|ms)

  • hms|ms [string|integer - required] (ex. '3600s', '60 minutes', '1 hr', 3600000)


MIT © Andrew Carpenter

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free