Documentation
¶
Overview ¶
Package time provides time helpers.
Example ¶
The calendar-scaled durations compose with the standard time package.
package main
import (
"fmt"
xtime "github.com/gechr/x/time"
)
func main() {
fmt.Println(xtime.Day)
fmt.Println(xtime.Week)
fmt.Println(xtime.Year)
}
Output: 24h0m0s 168h0m0s 8760h0m0s
Index ¶
Examples ¶
Constants ¶
View Source
const ( Day = 24 * time.Hour Week = 7 * Day Year = 365 * Day )
Calendar-scaled durations beyond what the standard time package names. A day is 24 hours, a week is 7 days, and a year is 365 days, matching github.com/gechr/x/human.FormatDuration and github.com/gechr/x/human.ParseDuration.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.