dateutils

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DayStart

func DayStart(t time.Time) time.Time

Equivalent to midnight of the provided date time taking into account the location

func NextWeekday

func NextWeekday(day time.Weekday, t time.Time) time.Time

Returns midnight of the next desired weekday

If the desired weekday is the current day then the current day will be returned

func WeekEnd

func WeekEnd(day time.Weekday, t time.Time) time.Time

func WeekStart

func WeekStart(day time.Weekday, t time.Time) time.Time

Returns midnight of the start of the week for a given day

If the desired weekday is the current day then the current day will be returned

func YearEnd

func YearEnd(t time.Time) time.Time

Equivalent to 1 nanosecond before midnight of January 1st for the following year of the provided date time taking into account the location

func YearQuarter

func YearQuarter(t time.Time) int

Quarter of the provided year in the range of 1-4

func YearStart

func YearStart(t time.Time) time.Time

Equivalent to midnight of January 1st for the year of the provided date time taking into account the location

Types

This section is empty.

Jump to

Keyboard shortcuts

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