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"
API reference
Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.
Functions
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| Add | — | func | |
| Diff | — | func | |
| EndOfDay | — | func | |
| EndOfMonth | — | func | |
| Format | moment().format() | func | |
| Now | — | func | |
| Parse | — | func | |
| ParseDuration | ms('2d') | func | |
| StartOfDay | — | func | |
| StartOfMonth | — | func |
Constants
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| LayoutDate | — | const | |
| LayoutDateTime | — | const | |
| LayoutISO | — | const | |
| LayoutTime | — | const |