core.formatperiod | Medplum

formatPeriod() function

Formats a FHIR Period as a human readable string.

Signature:

export declare function formatPeriod(period: Period | undefined, locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string;

Parameters

Parameter Type Description
period Period | undefined The period to format.
locales Intl.LocalesArgument (Optional) Optional locales.
options Intl.DateTimeFormatOptions (Optional) Optional period format options.

Returns:

string

The formatted period string.