Skip to main content

core.formattime

Home > @medplum/core > formatTime

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 | undefined): string;

Parameters

ParameterTypeDescription
timestring | undefinedThe date to format.
localesIntl.LocalesArgument(Optional) Optional locales.
optionsIntl.DateTimeFormatOptions | undefined(Optional) Optional time format options.

Returns:

string

The formatted time string.