1.2.0 • Published 1 year ago

@ce1pers/date-helpers v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@ce1pers/date-helpers

Simple helpers related to date or time.

Installation

npm

npm i @ce1pers/date-helpers

yarn

yarn add @ce1pers/date-helpers

Links

Usage

// Import Library.
import { getPassedTime, convertDateToEight, convertEightToDate, makeCalendar } from "@ce1pers/date-helpers";

// Set datetime.
const date = new Date("2022-11-19T21:30:00");

// Get passed time.
const passedTime = getPassedTime(date);
console.log(passedTime);

// Convert to eight digit time.
const eight = convertDateToEight(date);
console.log(eight);

// Convert to date.
const convertedDate = convertEightToDate(eight);
console.log(convertedDate);

// Make current month calendar.
const currentMonthCalendar = makeCalendar(date.getFullYear(), date.getMonth() + 1);
console.log(currentMonthCalendar);
1.2.0

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago