@euripidean/js-date-library
v1.0.8
Published
[School Assignment] JS Library to manipulate dates
Downloads
10
Readme
js-date-library
[School Assignment] JS Library to manipulate dates
@euripidean/js-date-library
Introduction
@euripidean/js-date-library
is a JavaScript date manipulation library that provides easy-to-use date formatting and calculation capabilities. It simplifies working with dates in your JavaScript projects.
Installation
You can install the library using npm:
npm install @euripidean/js-date-library
Usage
const D = require("@euripidean/js-date-library");
// Create a new D instance
const myDate = new D();
// Get the year
console.log(myDate.year); // e.g., 2023
// Format the date
console.log(myDate.format("Y-M-D")); // e.g., 2023-September-2
// Calculate the time elapsed
console.log(myDate.when()); // e.g., Just now