FHIR Date Checker
Type a FHIR R4 value. FHIR is published by HL7 International, and it has three primitive types that carry a date: date, dateTime and instant. The tool calls parseFHIR and isValidFHIR and shows which of the three types the value fits, and what it names: a year, a month, a day or an instant. The last section shows what formatFHIR writes back.
How a value is read. parseFHIR keeps the precision that was sent. A year, a month or a day is a partial value with no instant, and the tool never pads it. A time to the second or finer with an offset is an instant. A dateTime with a time must also carry an offset or Z. Without one it is not a FHIR value, and the tool reads it neither as a local time nor as UTC.
Why a pattern match is shape only. HL7 International publishes one regular expression for each type, and the specification calls them “informative, not normative”. A value can match its pattern and still not be a date, such as 2024-02-30. The tool shows the pattern result and the library result side by side, and the “Why” line says what the pattern cannot catch.
What the writer refuses. formatFHIR writes a type only when the moment fits it, and the cell says “no result” when it does not. FHIR has no minute precision, so a time to the minute is not written. It has no leap second, so :60 is refused. It never fills in what was not sent: a date has no time to give an instant, and the writer will not make one up. An offset of -00:00 is kept as sent.
The functions. parseFHIR reads, formatFHIR writes and isValidFHIR tells a bad value from a good one. The rules are in Healthcare: Clinical Timestamps. For an HL7 v2 value, use the HL7 Timestamp Reader.
Worth trying: a date that is not on the calendar, which matches its pattern and is still refused. Then a time to the minute: ISO 8601 allows it, and FHIR does not.
© 2026 NorthGuild · Licences
Code examples: MIT-0. Packages: MIT. Third-party data and components: their own licences, credited where they appear. Everything else: © 2026 NorthGuild, all rights reserved.