core.formatdate | Medplum
formatDate() function
Formats a FHIR date string as a human readable string. Handles missing values and invalid dates.
Signature:
export declare function formatDate(date: string | undefined, locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;
Parameters [](/content/docs/sdk/core.formatdate#parameters "Direct link to Parameters"/index.html)
| Parameter | Type | Description |
|---|---|---|
| date | string | undefined | The date to format. |
| locales | Intl.LocalesArgument | (Optional) Optional locales. |
| options | Intl.DateTimeFormatOptions | (Optional) Optional date format options. |
Returns:
string
The formatted date string.