1.0.3 • Published 3 years ago

@tsamantanis/date-lib v1.0.3

Weekly downloads
85
License
ISC
Repository
github
Last release
3 years ago

Date Library

The goal of this package is to handle date operations in a better and more intuitive way than the built in Date Object

npm bundle size GitHub release (latest by date)

Installation

To install this library, run

npm install @tsamantanis/date-lib

inside your project directory.

Usage

const BetterDate = require('@tsamantanis/date-lib')

const betterDate = new BetterDate()
functionsample output
.year2021
.yr21
.monthSeptember
.monSep
.day26
.hours18
.mins54
.secs32
.when()23 minutes ago

format()

inputexampledescription
Y2021year in 4 digit format
y21year in 2 digit format
MSeptemberfull month name
mSepshortened version of month name
D02day in 2 digit format
d2day
F02ndday in 2 digit format with ordinal prefix
f2day with ordinal prefix
EWednesdayname of day
eWedshortened name of day of the week
H01hours in 2 digit format
h1hours
I02minutes in 2 digit format
i2minutes
S03seconds in 2 digit format
s3seconds
1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago