Skip to content

Implement explicit toString() serialization for FhirPathDateTime and FhirPathTime #84

Description

@Itskiprotich

Description

Currently, FhirPathDateTime and FhirPathTime lack a custom .toString() implementation. Calling .toString() prints a generic object reference instead of a readable date/time string, making logging and debugging difficult.

Proposed Solution

Add .toString() methods to both classes to output standard FHIR/ISO strings matching their precision level (matching what FhirPathDate already does).

Expected Outputs:

  • FhirPathDateTime -> @2026-06-23T20:46:16Z (or @2026-06 for partials)
  • FhirPathTime -> T20:46:16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions