1.0.3 • Published 4 months ago

smart-date-format v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

smart-date-format

A smart date formatting library with locale support.

Installation

npm install smart-date-format

Usage

const SmartDateFormat = require("smart-date-format");

const dateFormatter = new SmartDateFormat("en-US");

console.log(dateFormatter.format(new Date(), "long")); 
// Example Output: "Saturday, March 15, 2025"

console.log(dateFormatter.relative(new Date(Date.now() - 3600000))); 
// Example Output: "1 hours ago"
1.0.3

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago