@hellojayjay/time
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

@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 Name Number
MILLISECOND_UNIT 1
SECOND 1000
MINUTE 60000
HOUR 3600000
DAY 86400000
WEEK 604800000
MONTH_28 2419200000
MONTH_29 2505600000
MONTH 2592000000
MONTH_31 2678400000
YEAR 31536000000
YEAR_366 31622400000

Time in second

Constant Name Number
SECOND_UNIT 1
SECOND_PER_MINUTE 60
SECOND_PER_HOUR 3600
SECOND_PER_DAY 86400
SECOND_PER_WEEK 604800
SECOND_PER_MONTH_28 2419200
SECOND_PER_MONTH_29 2505600
SECOND_PER_MONTH 2592000
SECOND_PER_MONTH_31 2678400
SECOND_PER_YEAR 31536000
SECOND_PER_YEAR_366 31622400

Package Sidebar

Install

npm i @hellojayjay/time

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

23.6 kB

Total Files

16

Last publish

Collaborators

  • hellojayjay