footer-year
v1.0.4
Published
Tiny TypeScript utility to generate dynamic footer year text
Maintainers
Readme
footer-year
A tiny TypeScript utility to generate dynamic footer year text for websites and systems.
Perfect for keeping your footer copyright year up to date automatically.
✨ Features
- Automatically uses the current year
- Supports single year or range (start → current year)
- Optional custom message
- Zero dependencies
- TypeScript-first (with type definitions included)
- Works in Node.js, React, Next.js, Vue, plain JS
Why use footer-year?
Most projects hardcode years in footers and forget to update them. This utility keeps your footer automatically current, with minimal setup.
📦 Installation
npm install footer-year📝 Usage
import { footerYear } from "footer-year";
console.log(footerYear()); // 2023Single Year
footerYear();
2026 ©Range
footerYear({
format: "range",
startYear: 2020,
});
2020 - 2026 ©Custom Message
footerYear({
format: "single",
startYear: 2020,
message: " Made with ❤️",
})
2026 © Made with ❤️