Skip to content

FormatDateInput — @gj-kit/format

A public type from @gj-kit/format. The signature below is taken directly from the 0.1.1 release declaration.

import { FormatDateInput } from '@gj-kit/format';
/**
* Accepted date inputs: an instant, never a wall-clock string.
*
* Strings are deliberately absent. `new Date('2026-06-08T09:05:00')` resolves
* an offset-less string against the *device* zone, so the same API payload
* becomes a different instant on different phones — and no `timeZone` option
* can undo that, because it happened before the formatter saw the value.
* Parse strings with {@link parseIsoInstant}, which makes that choice explicit.
*
* A number is epoch milliseconds.
*/
type FormatDateInput = Date | number;

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/format
  • Version: 0.1.1
  • Public entry: .
  • Source: GitHub