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
Parameter | Type | Description |
---|---|---|
time | string | undefined | The date to format. |
locales | Intl.LocalesArgument | (Optional) Optional locales. |
options | Intl.DateTimeFormatOptions | undefined | (Optional) Optional time format options. |
Returns:
string
The formatted time string.