Documentation
¶
Overview ¶
Package dateutil provides a custom flag for dates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // EveryMinute will chop up a timespan into 60s intervals; // https://english.stackexchange.com/questions/3091/weekly-daily-hourly-minutely. EveryMinute = makeIntervalFunc( func(t time.Time) time.Time { return now.With(t).BeginningOfMinute() }, func(t time.Time) time.Time { return now.With(t).EndOfMinute() }, ) // Hourly will chop up a timespan into 60min intervals. Hourly = makeIntervalFunc( func(t time.Time) time.Time { return now.With(t).BeginningOfHour() }, func(t time.Time) time.Time { return now.With(t).EndOfHour() }, ) // Daily will chop up a timespan into 24h intervals. Daily = makeIntervalFunc( func(t time.Time) time.Time { return now.With(t).BeginningOfDay() }, func(t time.Time) time.Time { return now.With(t).EndOfDay() }, ) // Weekly will chop up a timespan into 7 day intervals. Weekly = makeIntervalFunc( func(t time.Time) time.Time { return now.With(t).BeginningOfWeek() }, func(t time.Time) time.Time { return now.With(t).EndOfWeek() }, ) // Monthly will chop up a timespan into monthly intervals. Monthly = makeIntervalFunc( func(t time.Time) time.Time { return now.With(t).BeginningOfMonth() }, func(t time.Time) time.Time { return now.With(t).EndOfMonth() }, ) )
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.