core.formattime | Medplum

formatTime() function

Formats a FHIR time string as a human readable string. Handles missing values and invalid dates.

Signature:

export declare function formatTime(time: string | undefined, locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;

Parameters

Parameter Type Description
time string | undefined The date to format.
locales Intl.LocalesArgument (Optional) Optional locales.
options Intl.DateTimeFormatOptions (Optional) Optional time format options.

Returns:

string

The formatted time string.