Skip to content

Conversation

@EmiliaPaz
Copy link
Contributor

@EmiliaPaz EmiliaPaz commented May 27, 2025

Description

GET applications/ have fromDate and toDate parameters that receive an ISO-8601 date (YYYY-MM-DD). #10636 updated the date parser to support time stamps, still with the ISO-8601 format.

Checklist

General

  • Ensure any links to pages aren't referenced in code (if there are changes to links)
  • Changes to the website have been verified via steps here

Issue(s) this completes

Part of #5483

EmiliaPaz added a commit to civiform/civiform that referenced this pull request Jun 3, 2025
### Description

List applications have `fromDate` and `toDate` parameters that receive
an ISO-8601 date (YYYY-MM-DD). This PR updates the date parser to
support time stamps, still with the ISO-8601 format.

In order to not break current calls, we need to continue supporting only
date parameters. Therefore, we introduce
`parseIso8601DateToLocalDateTimeInstant(dateString)` with three parsing
scenarios in order of preference:

1. Full ISO-8601 string with timezone information (e.g.,
"2023-12-25T10:30:00Z")
2. ISO-8601 date-time without timezone (e.g., "2023-12-25T10:30:00"),
converted using the configured local zone
3. ISO-8601 date only (e.g., "2023-12-25"), defaulting to start of day
in local timezone

Since we are maintaining existing functionality, this change is not
under a feature flag

User-facing documentation will be updated in
civiform/docs#559

### Checklist

#### General

Read the full guidelines for PRs
[here](https://github.com/civiform/civiform/wiki/Technical-contribution-guide#creating-a-pull-request)

- [x] Added the correct label (see
[docs](https://github.com/civiform/civiform/wiki/Technical-contribution-guide#adding-appropriate-labels)
for more info): < feature | enhancement | bug | under-development |
dependencies | infrastructure | ignore-for-release | database >
- [x] Assigned to a specific person, `civiform/developers`, or a [more
specific round-robin
list](https://github.com/civiform/civiform/wiki/Technical-contribution-guide#adding-reviewers)
- [ ] Added an additional reviewer from outside your organization as FYI
(if the primary reviewer is in the same organization as you)
- [x] Removed the release notes section if the title is sufficient for
the release notes description, or put more details in that section.
- [x] Created unit and/or browser tests which fail without the change
(if possible)
- [x] Performed manual testing (Chrome and Firefox if it includes
front-end changes)
- [ ] Extended the README / documentation, if necessary. For user-facing
features, consider updating [the user
docs](https://github.com/civiform/docs). For "under-the-hood" changes or
things more relevant to developers, consider updating [the dev
wiki](https://github.com/civiform/civiform/wiki).
- [ ] Ensured PII wasn't added to any new logs, unless it was guarded by
`isDevOrStaging`
- [ ] Noted in the PR description which, if any, code in this PR was
generated by AI.

### Issue(s) this completes

Part of #5483
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants