date-namer
v1.0.0
Published
Generate fun and readable names from JavaScript Date objects.
Maintainers
Readme
📆 date-namer
Generate fun and readable names from JavaScript Date objects!
✨ Install
npm install date-namer🚀 Usage
const dateNamer = require("date-namer");
console.log(dateNamer(new Date("2025-06-13")));
// ➜ "Friday the Thirteenth"
console.log(dateNamer(new Date("2025-06-13"), "friendly"));
// ➜ "Friday, June 13th, 2025"
console.log(dateNamer(new Date("2023-01-02"), "ordinal-weekday"));
// ➜ "The First Monday of 2023"🧩 Supported Formats
"spooky":
Returns"Friday the Thirteenth"if the date matches, or"Weekday the Ordinal"(e.g.,"Monday the 8th")."friendly":
Full date in human-readable form, e.g.,"Tuesday, June 13th, 2025"."ordinal-weekday":
The occurrence of the weekday within the year, e.g.,"The Second Wednesday of 2022".
📦 API
dateNamer(date, format?)date: ADateobject (required)format: A string ("spooky","friendly", or"ordinal-weekday"). Default:"spooky"
🛠 License
MIT © 2025 Nox
