Skip to main content

core.formatperiod

Home > @medplum/core > formatPeriod

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

Parameters

ParameterTypeDescription
periodPeriod | undefinedThe period to format.
localesIntl.LocalesArgument(Optional) Optional locales.
optionsIntl.DateTimeFormatOptions | undefined(Optional) Optional period format options.

Returns:

string

The formatted period string.