Skip to content
Node: moment, dayjs (package timex)github.com/sahilkhaire/gox/time

StartOfMonth

Overview

Part of the time package — Node.js analog: moment, dayjs (package timex).

Signature

go
func StartOfMonth(t stdtime.Time) stdtime.Time

Compare: Node.js · Standard Go · gox

js
// Typical moment, dayjs (package timex) pattern in Node.js
go
// 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.

Back to time package overview

MIT Licensed · Built for Node.js developers moving to Go