A lightweight Go library for human-friendly datetime creation, transformation, formatting, and parsing.
Gostradamus is a Go library that provides a more intuitive and human-friendly way to work with dates and times. It wraps Go's standard `time` package, offering easier parsing, formatting, shifting, and timezone manipulation while maintaining full compatibility with `time.Time`. It solves the problem of verbose and complex datetime handling in Go.
Go developers who frequently work with datetime parsing, formatting, or manipulation and want a cleaner, more expressive API than the standard library provides.
Developers choose Gostradamus for its human-readable format tokens, seamless conversion with `time.Time`, and comprehensive helper methods for shifting, spanning, and timezone handling—all while being lightweight and production-ready.
Gostradamus: Better DateTimes for Go 🕰️
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses human-readable tokens like 'YYYY-MM-DD' for parsing and formatting, eliminating the need to memorize Go's cryptic '2006-01-02' layout strings.
Offers easy conversion methods between gostradamus.DateTime and time.Time, ensuring full compatibility with existing Go codebases and libraries.
Includes chainable methods for shifting, replacing, flooring, and spanning dates, covering common operations that often require boilerplate in standard Go.
Provides predefined timezone constants and simple conversion methods, simplifying timezone-aware datetime handling without manual string parsing.
The README explicitly states that custom tokens or letters cannot be used in parsing strings, restricting flexibility for non-standard date formats.
Adds a third-party library to the project, which may conflict with teams aiming to minimize dependencies or adhere to strict compliance policies.
Timezones are defined as constants; handling new or custom timezones requires manual work or library updates, limiting dynamic use cases.