2.0.3 • Published 7 months ago

eazy-time v2.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Eazy Time

⏳ Getting Started

Just for quick explanation please check the examples:

const one_sec = 1000;
const one_min = one_sec * 60;
const one_hour = one_min * 60;
const one_day_v1 = one_hour * 24;

//OR
const one_day_v2 = 1000 * 60 * 60 * 24;

//OR 🥳
const one_day_v3 = EazyTime.OneDay;

//OR 🥳
const one_day_v4 = EazyTime.Day(1);

So, eazy-time is a more simplified way to get the "time".

⬇️ Install

npm install eazy-time --save

⏰ Usage

Importing package

import EazyTime from "eazy-time";

Now, you can get static field and functions for timestamp generator.

Ms

Generator

const ms = EazyTime.Ms(120);

Static Fields Table

PropertyValueTest
OneMs1🧪
TwoMs2🧪
ThreeMs3🧪
FourMs4🧪
FiveMs5🧪
SixMs6🧪
SevenMs7🧪
EightMs8🧪
NineMs9🧪
TenMs10🧪

Sec

Generator

const sec = EazyTime.Sec(45);

Static Fields Table

PropertyValueTest
OneSec1000🧪
TwoSec2000🧪
ThreeSec3000🧪
FourSec4000🧪
FiveSec5000🧪
SixSec6000🧪
SevenSec7000🧪
EightSec8000🧪
NineSec9000🧪
TenSec10000🧪

Min

Generator

const min = EazyTime.Min(90);

Static Fields Table

PropertyValueTest
OneMin60000🧪
TwoMin120000🧪
ThreeMin180000🧪
FourMin240000🧪
FiveMin300000🧪
SixMin360000🧪
SevenMin420000🧪
EightMin480000🧪
NineMin540000🧪
TenMin600000🧪

Hour

Generator

const hour = EazyTime.Hour(36);

Static Fields Table

PropertyValueTest
OneHour3600000🧪
TwoHour7200000🧪
ThreeHour10800000🧪
FourHour14400000🧪
FiveHour18000000🧪
SixHour21600000🧪
SevenHour25200000🧪
EightHour28800000🧪
NineHour32400000🧪
TenHour36000000🧪

Day

Generator

const day = EazyTime.Day(9);

Static Fields Table

PropertyValueTest
OneDay86400000🧪
TwoDay172800000🧪
ThreeDay259200000🧪
FourDay345600000🧪
FiveDay432000000🧪
SixDay518400000🧪
SevenDay604800000🧪
EightDay691200000🧪
NineDay777600000🧪
TenDay864000000🧪

Todo

TaskStatus
Write test cases for MS
Write test cases for Sec
Write test cases for Min
Create "Contribute" file⏱️
Add license
2.0.3

7 months ago

1.0.2

1 year ago

2.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.3

1 year ago

1.0.0-test.0

1 year ago