github.com/frobware/comptime
Package comptime (composite time) offers functionality for parsing durations, extending the capabilities of the standard library's `time.ParseDuration` function. It introduces support for an additional time unit, 'days' (denoted by 'd'), and enables the parsing of composite durations from a single string, such as '1d5m200ms'. Key Features: Supports the following time units: "d" (days), "h" (hours), "m" (minutes), "s" (seconds), "ms" (milliseconds), and "us" (microseconds). Capable of parsing composite durations such as "24d20h31m23s647ms". Ensures parsed durations are non-negative. Custom Range Checking: Allows the user to define their own range constraints on parsed durations through a BoundsChecker callback. This enables early termination of the parsing process based on user-defined limits.
proxy.golang.org
v0.1.0
almost 2 years ago
1
1
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/frobware/comptime
spec |
| License | MIT |
| Namespace | github.com/frobware |
| First Release | almost 2 years ago |
| Last Synced | 15 days ago |
Repository
| Stars | 0 on GitHub |
| Forks | 0 on GitHub |