Documentation
¶
Index ¶
- Constants
- Variables
- type TDiff
- func (t *TDiff) Days() string
- func (t *TDiff) Hours() string
- func (t *TDiff) Microseconds() string
- func (t *TDiff) Milliseconds() string
- func (t *TDiff) Minutes() string
- func (t *TDiff) Months() string
- func (t *TDiff) Nanoseconds() string
- func (t *TDiff) Seconds() string
- func (t *TDiff) Years() string
- func (t *TDiff) YearsShorthand() string
Constants ¶
View Source
const Day time.Duration = 24 * time.Hour
Day is a Duration of 24 hours
View Source
const Version = "1.2.2"
Version is the package version
Variables ¶
View Source
var RFC3339 *regexp.Regexp = regexp.MustCompile(
`^(\d{4}-\d\d-\d\d(T\d\d:\d\d:\d\d)?|now)$`,
)
RFC3339 is a regex to validate user-input.
Functions ¶
This section is empty.
Types ¶
type TDiff ¶
type TDiff struct {
// contains filtered or unexported fields
}
TDiff is a struct to hold the different between two dates for future use.
func (*TDiff) Microseconds ¶
Microseconds will return a string showing the full time duration in microseconds.
func (*TDiff) Milliseconds ¶
Milliseconds will return a string showing the full time duration in milliseconds.
func (*TDiff) Nanoseconds ¶
Nanoseconds will return a string showing the full time duration in nanoseconds.
func (*TDiff) YearsShorthand ¶
YearsShorthand will return a string showing if < 1 year or > 1 year.
Click to show internal directories.
Click to hide internal directories.