Skip to content

adwaithjayan/date-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗓️ date-react-formatter

A flexible and lightweight date/time formatter utility for React and JavaScrip/TypeScript.

---

✨ Features

  • 📅 Format dates in any locale
  • ⏰ 12h or 24h time support
  • 🔧 Fully customizable format string (dd/mm/yyyy, etc.)
  • 📦 Structured return format ({ day, month, year, ... })
  • 🌐 Lightweight, tree-shakable & TypeScript ready

📦 Installation

npm install date-react-formatter

🚀 Usage

// Import the formatter
import { formatDate } from "date-react-formatter";

// Basic usage
formatDate(new Date());
// Output: "Jul 19, 2025" (default options)

// Custom format
formatDate(new Date(), { customFormat: "dd/mm/yyyy HH:MM" });
// Output: "19/07/2025 21:45"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published