A lightweight Node.js utility for generating formatted timestamps with customizable patterns.
Time-stamp is a Node.js utility library that generates formatted timestamps for use in logging, file naming, or any application requiring date/time strings. It solves the problem of manually formatting dates by providing a simple pattern-based API that outputs consistent timestamp strings. The library supports both local and UTC time, with tokens for year, month, day, hours, minutes, seconds, and milliseconds.
Node.js developers and JavaScript engineers who need to generate formatted timestamps in their applications, particularly those working on build tools, logging systems, or file processing utilities.
Developers choose time-stamp for its simplicity, zero dependencies, and straightforward pattern-based formatting. Unlike larger date libraries, it focuses specifically on timestamp generation with minimal overhead, making it ideal for performance-sensitive applications.
Get a formatted timestamp. Used in gulp, assemble, generate, and many others.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
With zero dependencies and a focused codebase, it's optimized for performance, ideal for high-throughput logging or build tools as emphasized in the README's lightweight philosophy.
The pattern-based system using tokens like YYYY and MM is intuitive, with clear examples in the README showing easy customization for local and UTC timestamps.
Provides a dedicated timestamp.utc() method for consistent timezone handling, essential for distributed systems, as demonstrated in multiple usage examples.
Being a standalone package ensures no bloat, which benefits projects minimizing package size and avoiding dependency conflicts.
Lacks advanced date operations like parsing, date math, or locale formatting, which are standard in comprehensive libraries like Moment.js or date-fns.
Designed specifically for Node.js environments and doesn't support browser usage out-of-the-box, limiting its applicability for front-end projects.
Supports only a fixed set of tokens (YYYY, MM, DD, etc.) with no extensibility for custom formats or additional date parts like week numbers or timezone offsets.
Version 2.0.0 introduced a breaking change by altering the default pattern, which could disrupt existing code if not carefully updated, as noted in the release history.