0.0.2 • Published 3 years ago

@hellojayjay/time v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@hellojayjay/time

This is a very simple library defines the constants of unit of time, like millisecond per second, millisecond per minute, millisecond per hour, second per minute etc.

Install

npm install @hellojayjay/time

Usage

import { SECOND } from "@hellojayjay/time"

setInterval(() => {
  doSomething()
}, 3 * SECOND)

Time in millisecond

Constant NameNumber
MILLISECOND_UNIT1
SECOND1000
MINUTE60000
HOUR3600000
DAY86400000
WEEK604800000
MONTH_282419200000
MONTH_292505600000
MONTH2592000000
MONTH_312678400000
YEAR31536000000
YEAR_36631622400000

Time in second

Constant NameNumber
SECOND_UNIT1
SECOND_PER_MINUTE60
SECOND_PER_HOUR3600
SECOND_PER_DAY86400
SECOND_PER_WEEK604800
SECOND_PER_MONTH_282419200
SECOND_PER_MONTH_292505600
SECOND_PER_MONTH2592000
SECOND_PER_MONTH_312678400
SECOND_PER_YEAR31536000
SECOND_PER_YEAR_36631622400