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
Add—func
Diff—func
EndOfDay—func
EndOfMonth—func
Formatmoment().format()func
Now—func
Parse—func
ParseDurationms('2d')func
StartOfDay—func
StartOfMonth—func

Constants ​

SymbolNode.jsKindSummary
LayoutDate—const
LayoutDateTime—const
LayoutISO—const
LayoutTime—const

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