Documentation ¶
Overview ¶
Package time provide a library for working with time.
Index ¶
Constants ¶
View Source
const ( // Day the duration for a day. Day = 24 * time.Hour // Week the duration for a week. Week = 7 * Day )
Variables ¶
View Source
var ( ShortDayNames = []string{ "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun", } // // ShortMonths provide mapping between text of month, in English, // short format to their time.Month value // ShortMonths = map[string]time.Month{ "Jan": time.January, "Feb": time.February, "Mar": time.March, "Apr": time.April, "May": time.May, "Jun": time.June, "Jul": time.July, "Aug": time.August, "Sep": time.September, "Oct": time.October, "Nov": time.November, "Dec": time.December, } )
View Source
var ( // ErrDurationMissingValue an error when value is missing when parsing // duration. ErrDurationMissingValue = errors.New("missing value in duration") )
Functions ¶
func Microsecond ¶
Microsecond return the microsecond value of time.
func ParseDuration ¶
ParseDuration extend the capability of standard time.Duration with additional unit suffix: day and week. Day unit end with "d" and week unit end with "w". A day is equal with "24h", an a week is equal to "7d". Unlike standard time.Duration the week or day units must be before hours.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.