A Go package providing a lightweight Date type and related utilities for calendrical calculations, parsing, and formatting.
Rickb777/date is a Go library that provides a storage-efficient Date type and additional utilities for working with dates, timespans, and clocks. It handles calendrical calculations, parsing, and formatting, including support for years outside the typical 0-9999 range, making it suitable for a wide range of date-related operations in Go applications.
Go developers who need efficient date handling beyond the standard time package, such as those working with historical dates, date intervals, or requiring lightweight date storage.
Developers choose this library for its lightweight, integer-based Date type that enables efficient storage and operations, seamless integration with Go's idiomatic patterns, and support for years outside the 0-9999 range, which the standard time package does not handle.
A Go package for working with dates
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The Date type is integer-based, representing days since year zero, which enables lightweight storage and fast arithmetic operations using Go operators.
Handles years outside the 0-9999 range, a limitation of Go's standard time package, making it suitable for historical or far-future calendrical calculations.
Closely follows the standard time package's patterns, ensuring seamless integration and familiar API for Go developers, as noted in the credits.
Includes Clock for nanosecond time, DateRange for intervals, TimeSpan for RFC5545 durations, and VDate for templates, covering diverse date-related needs.
Version 2 introduces significant breaking changes from v1, such as Date becoming integer-based and renamed methods, requiring data migration and code updates that can be error-prone.
As a niche library, it lacks the extensive third-party integrations and community support of Go's standard time package, which may hinder adoption in larger projects.
Relies on Mage for building, as mentioned in the installation steps, adding an extra dependency and complexity for developers accustomed to plain Go commands.