You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
220 B
Go

package internal
import "time"
func BeginningOfMonth() time.Time {
now := time.Now()
year, month, _ := now.Date()
beginningOfMonth := time.Date(year, month, 1, 0, 0, 0, 0, now.Location())
return beginningOfMonth
}