FHIR Chat · Comparing parts of a date? · fhirpath

Stream: fhirpath

Topic: Comparing parts of a date?


view this post on Zulip Jean Duteau (Jun 10 2021 at 19:49):

I need to assert that a date (or dateTime or timestamp) matches the current year. I don't see any date extraction functions so the best I've come up with is:

timestamp.toString().startsWith(today().toString().substring(0,4))

Is there a better way?

view this post on Zulip Grahame Grieve (Jun 10 2021 at 20:04):

I don't think so

view this post on Zulip Bryn Rhodes (Jun 10 2021 at 20:28):

There's an existing tracker to add these: https://jira.hl7.org/browse/FHIR-26554


Last updated: Apr 12 2022 at 19:14 UTC