StartOfMonth
Overview
Part of the time package — Node.js analog: moment, dayjs (package timex).
Signature
go
func StartOfMonth(t stdtime.Time) stdtime.TimeCompare: Node.js · Standard Go · gox
js
// Typical moment, dayjs (package timex) pattern in Node.jsgo
// Use the underlying stdlib or driver directly.
// See package overview for escape hatches.go
import "github.com/sahilkhaire/gox/time"
start := timex.StartOfMonth(time.Now())Example
go
import "github.com/sahilkhaire/gox/time"
start := timex.StartOfMonth(time.Now())Tips
Import github.com/sahilkhaire/gox/time and call StartOfMonth directly. See the comparison below for the standard library equivalent.
Standard library alternative
gox wraps the Go standard library or a trusted dependency with Node-familiar naming. You can use the underlying library directly — see the package overview for escape hatches.