package
module
Version:
v0.0.0-...-48c437a
Opens a new window with list of versions in this module.
Published: Apr 18, 2019
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
bigdur
A small Go package for parsing larger durations.

Install
go get -u go.coder.com/bigdur
Overview
A duration token consists of a series of coefficient and unit pairs.
For example:
are valid.
The following units are available:
| Abbreviation |
Description |
| s |
1 second |
| m |
60 seconds |
| h |
60 minutes |
| d |
24 hours |
| w |
7 days |
| mo |
30 days |
| y |
12 months |
Documentation
¶
Package bigdur parses large durations.
In addition to units supported by the standard library,
It supports:
- d for 24 hours
- mo for 30 days
- y for 12 months
Duration represents an interval of time.
Duration converts into a standard library time.Duration.
String returns a human-readable representation of Duration.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.