@saichinmay/js-dateformatter
v1.0.2
Published
This NPM package provides a simple utility function to format a given JavaScript `Date` object into the format `DD-MMM-YYYY`, such as `19-Sep-2024`.
Downloads
12
Readme
Date Formatter NPM Package
This NPM package provides a simple utility function to format a given JavaScript Date
object into the format DD-MMM-YYYY
, such as 19-Sep-2024
.
Installation
You can install this package via NPM:
npm install @saichinmay/js-dateformatter
// Import the package
const {getFormattedDate} = require('@saichinmay/js-dateformatter');
// Create a new Date object
const date = new Date();
// Format the date
const formattedDate = getFormattedDate(date);
// Output: '19-Sep-2024'
console.log(formattedDate);