stringduration

package
v0.0.0-...-6deaddc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package stringduration extends formatting for durations as strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Distance

func Distance(year, month, day int, now time.Time) time.Duration

Distance returns the duration between "now" and multiples of year/month/day. If now is zerotime, the current time is used.

func Parse

func Parse(s string) (time.Duration, error)

Parse a duration (like time.Duration), but additionally support D(ay), W(eek), M(onth), Y(year) being aware of calendar accuracy.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL