跳到主要内容

std/build/date

std/build/date

Type Aliases

DateRangeWire

type DateRangeWire = Schema.Schema.Type<typeof DateRangeWireSchema>;

Defined in: apps/website/.api-docs-entry/std/build/date/index.d.ts:12


FormatInstantOptions

type FormatInstantOptions = Intl.DateTimeFormatOptions & object;

Defined in: apps/website/.api-docs-entry/std/build/date/index.d.ts:13

Type Declaration

locale?
optional locale?: string;

Variables

DateRangeWireSchema

const DateRangeWireSchema: Schema.Struct<{
  end: Schema.optional<Schema.NullishOr<Schema.String>>;
  start: Schema.optional<Schema.NullishOr<Schema.String>>;
}>;

Defined in: apps/website/.api-docs-entry/std/build/date/index.d.ts:8

An inclusive date range over UTC calendar days, as it travels between client and server.

Both bounds may be absent (an open-ended range) and both may be null (shown as ), so the schema keeps the wire shape explicit; formatDateRangeLocal is the one renderer of it.

Functions

formatDateISO()

function formatDateISO(value): string;

Defined in: apps/website/.api-docs-entry/std/build/date/index.d.ts:23

UTC calendar day YYYY-MM-DD from a stored instant or calendar string.

Parameters

Parameter Type
value string | Date

Returns

string


formatDateRangeLocal()

function formatDateRangeLocal(range, options?): string;

Defined in: apps/website/.api-docs-entry/std/build/date/index.d.ts:21

Parameters

Parameter Type
range | { end?: string | null; start?: string | null; } | null | undefined
options? FormatInstantOptions

Returns

string


formatUtcInstantLocal()

function formatUtcInstantLocal(value, options?): string;

Defined in: apps/website/.api-docs-entry/std/build/date/index.d.ts:20

Parameters

Parameter Type
value string
options? FormatInstantOptions

Returns

string


isCalendarDate()

function isCalendarDate(value): boolean;

Defined in: apps/website/.api-docs-entry/std/build/date/index.d.ts:17

Parameters

Parameter Type
value string

Returns

boolean


isClockTime()

function isClockTime(value): boolean;

Defined in: apps/website/.api-docs-entry/std/build/date/index.d.ts:18

Parameters

Parameter Type
value string

Returns

boolean


isUtcIsoInstant()

function isUtcIsoInstant(value): boolean;

Defined in: apps/website/.api-docs-entry/std/build/date/index.d.ts:16

Parameters

Parameter Type
value string

Returns

boolean


parseUtcInstant()

function parseUtcInstant(value): Date;

Defined in: apps/website/.api-docs-entry/std/build/date/index.d.ts:19

Parameters

Parameter Type
value string

Returns

Date