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