dateformat is a Node.js package for formatting JavaScript dates through readable, reusable mask strings. It adapts Steven Levithan's dateFormat function for module-based Node.js usage without extending the native Date prototype. Developers can build formats from tokens representing days, months, years, hours, minutes, seconds, milliseconds, time zones, and ordinal suffixes. Several predefined masks cover common formats ranging from short dates to ISO date-time strings. Custom masks can be created and reused for application-specific output. Dates can be formatted in local time or converted to UTC and GMT representations. The package also supports localization of weekday names, month names, and AM or PM labels, along with ISO week and weekday values.

Features

  • Custom date formatting masks
  • Built-in named date formats
  • UTC and GMT formatting
  • ISO week and weekday tokens
  • Localized day and month names
  • String, Date, and current-time input support

Project Samples

Project Activity

See All Activity >

Categories

Package Managers

License

MIT License

Follow dateformat

dateformat Web Site

Other Useful Business Software
$300 Free Credits to Build on Google Cloud Icon
$300 Free Credits to Build on Google Cloud

New customers can spin up VMs, build with AI, and query data at no cost.

Put your $300 in credit toward real workloads, then keep building with free monthly usage for 20+ products. No commitment and no charge until you upgrade.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of dateformat!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Package Managers

Registered

11 hours ago