fix: strict ClockTime parsing and ISODuration SQL
Validate constructors, strict HH:MM:SS parse, UTC ClockTimeFromTime, ISODuration Value/Scan, Compare and TextMarshaler, codec.go split. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// Package clocktime provides ClockTime (time-of-day) and ISODuration types with
|
||||
// JSON, GraphQL, SQL, and text serialization.
|
||||
//
|
||||
// # ClockTime
|
||||
//
|
||||
// [ClockTime] stores HH:MM:SS without a date. Use [ParseClockTime] for strict parsing.
|
||||
// Optional fields should use *ClockTime; [ClockTime.IsZero] is true only for nil pointers.
|
||||
// Midnight 00:00:00 is valid—use [ClockTime.IsMidnight] to test for midnight.
|
||||
//
|
||||
// # ISODuration
|
||||
//
|
||||
// [ISODuration] wraps [time.Duration] with ISO 8601 formatting via sosodev/duration.
|
||||
// SQL storage uses int64 nanoseconds; strings are also accepted on scan.
|
||||
package clocktime
|
||||
Reference in New Issue
Block a user