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
Ship Agents Faster Icon
Ship Agents Faster

Transform your applications and workflows into powerful agentic systems at global scale.

Gemini Enterprise Agent Platform lets you rapidly build, scale, govern and optimize production-ready agents grounded in your organization's data. The platform enables developers to build custom or pre-built agents for virtually any use case. New customers get $300 in free credits.
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