ms-ru
v0.0.1
Published
The ms package supported with russian language
Downloads
2
Maintainers
Readme
ms-ru
Use this package to easily convert various time formats to milliseconds.
Formats
let ms = require('ms-ru')
ms('2 days') // 172800000
ms('1d') // 86400000
ms('10h') // 36000000
ms('2.5 hrs') // 9000000
ms('2h') // 7200000
ms('1m') // 60000
ms('5s') // 5000
ms('1y') // 31557600000
ms('100') // 100
ms('-3 days') // -259200000
ms('-1h') // -3600000
ms('-200') // -200
ms('2 дня') // 172800000
ms('1д') // 86400000
ms('10ч') // 36000000
ms('1 час') // 3600000
ms('100') // 100
ms('10часов') // 36000000
// There are still several formats =)
How to use?
let ms = require('ms-ru')
// Using without arguments
setTimeout(() => {
// Your code
}, ms('1час'))
setTimeout(() => {
// Your code
}, ms('1h'))
Find a Bug?
Report it Here