Documentation
¶
Index ¶
- func CalculateStepsForTimeRange(from, to time.Time, steps int) time.Duration
- func EndOfMonth(t time.Time) time.Time
- func EndOfQuarter(t time.Time) time.Time
- func EndOfWeek(t time.Time) time.Time
- func EndOfYear(t time.Time) time.Time
- func LastDayOfMonth(t time.Time) time.Time
- func MonthFirst(t time.Time) time.Time
- func NextMonths(t time.Time, months int) time.Time
- func QuarterFirst(t time.Time) time.Time
- func RoundTimeToDay(t time.Time) time.Time
- func SetEndOfDay(t time.Time) time.Time
- func WeekMonday(t time.Time) time.Time
- func YearFirst(t time.Time) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateStepsForTimeRange ¶
CalculateStepsForTimeRange calculates the step duration for a given time range and number of steps.
func EndOfMonth ¶
EndOfMonth returns the last TS of the month for the given time.
func EndOfQuarter ¶
EndOfQuarter returns the last TS of the quarter for the given time.
func LastDayOfMonth ¶
LastDayOfMonth returns the last day of the month for the given time.
func MonthFirst ¶
MonthFirst returns the first TS of the month for the given time.
func NextMonths ¶
NextMonths returns the time after adding the specified number of months to the given time.
func QuarterFirst ¶
QuarterFirst returns the first TS of the quarter for the given time.
func RoundTimeToDay ¶
RoundTimeToDay rounds a time to the start of the day (00:00:00).
func SetEndOfDay ¶
SetEndOfDay sets the time to the end of the day (23:59:59.999999999) in a given TS.
func WeekMonday ¶
WeekMonday returns the Monday of the week for the given time.
Types ¶
This section is empty.