func StartOfMonth(date time.Time) time.Time { return time.Date(date.Year(), date.Month(), 1, 0, 0, 0, 0, date.Location())}
This function calculates the number of days since Sunday and subtracts this value from the given date.
[
add
]
[
|
|
...
]
func StartOfMonth(date time.Time) time.Time { return time.Date(date.Year(), date.Month(), 1, 0, 0, 0, 0, date.Location())}
This function calculates the number of days since Sunday and subtracts this value from the given date.