Skip to main content

ms

Converts Human readable time to milliseconds

Implementation

simplydjs.ms('human readable time')

Types

simplydjs.ms(
str: string,
)

Returns


Example

ms.js
const simplydjs = require('simply-djs')

simplydjs.ms('20s')
// 20000
  • Can convert mad-like strings

ms.js
const simplydjs = require('simply-djs')

simplydjs.ms('0.5d 2h 3m 5s')
// 50585000