timex
A Go package that extends the standard library time with dedicated date and time-of-day types
About timex
timex
š A Go package that extends the standard library time with dedicated date and time-of-day types.
Why use timex?
timex is a lightweight and efficiently designed Go package that provides dedicated Date and TimeOfDay types. It's built with 100% unit test coverage and has no third-party dependencies, making it a reliable choice for time-related operations.
- Missing Standard Library Types: Go's
timepackage lacks distinct types for handling just a date or just a time of day.timexintroducesDateandTimeOfDayto bridge this gap, offering a more intuitive and focused API for these specific use cases. - Simplicity and Clarity: Our
Datetype focuses exclusively on date operations (YYYY-MM-DD), avoiding timezone-related issues inherent intime.Timewhen only a calendar date matters. Similarly,TimeOfDayprovides a clear HH:mm:ss format for operations strictly on time, independent of any particular date. - Lightweight & Efficient:
timexis designed to be lean, with fast method implementations that often outperformtime.Timefor specific date and time-of-day calculations. It's built without any external dependencies, ensuring a minimal footprint. - Database & JSON Compatibility: Work directly with
DATEandTIMEtypes in databases like MySQL or PostgreSQL, and effortlessly serialize/deserialize these types to and from JSON. - Reliability: With 100% unit test coverage, you can be confident in the package's correctness and stability.
Getting Started
go get github.com/invzhi/timex
Reference
Frequently Asked Questions
What is timex?
timex is a Date and Time library for the Go programming language. A Go package that extends the standard library time with dedicated date and time-of-day types
How do I install timex?
Install timex with the Go module system using `go get invzhi/timex`. Check the repository for the current installation instructions.
What category does timex belong to?
timex is listed under Date and Time, specifically Date and Time.