core.isvalidcalendardate
Home > @medplum/core > isValidCalendarDate
isValidCalendarDate() function
Checks that the day exists in its month, e.g. rejects 2023-02-29. Assumes the input already matched the date, dateTime, or instant regex.
Signature:
export declare function isValidCalendarDate(str: string): boolean;
Parameters
Parameter | Type | Description |
|---|---|---|
str | string | The date, dateTime, or instant string. |
Returns:
boolean
True if the day is valid or not present.