Skip to content
Node: moment, dayjs (package timex)14 APIs

time

Package timex provides date/time helpers similar to moment, dayjs, and date-fns. Import path: github.com/sahilkhaire/gox/time (package timex). Node equivalent: moment, dayjs, date-fns, ms

import "github.com/sahilkhaire/gox/time"
::: warning Package identifier Import `github.com/sahilkhaire/gox/time` but use the identifier **`timex`** in code — avoids clashing with Go's standard `time` package. :::

API reference

Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.

Functions

SymbolNode.jsKindSummary
Addfunc
Difffunc
EndOfDayfunc
EndOfMonthfunc
Formatmoment().format()func
Nowfunc
Parsefunc
ParseDurationms('2d')func
StartOfDayfunc
StartOfMonthfunc

Constants

SymbolNode.jsKindSummary
LayoutDateconst
LayoutDateTimeconst
LayoutISOconst
LayoutTimeconst

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