Skip to content

Preserve year-only Date Issued values - #337

Merged
ewlarson merged 1 commit into
developfrom
feature/date-issued-year-display
Aug 19, 2026
Merged

Preserve year-only Date Issued values#337
ewlarson merged 1 commit into
developfrom
feature/date-issued-year-display

Conversation

@ewlarson

Copy link
Copy Markdown
Contributor

Summary

  • preserve four-digit Date Issued values as year-only displays
  • continue formatting full yyyy-mm-dd values with month and day
  • add regression coverage for both year-only and full-date values

Root cause

The Full Details formatter passed year-only strings to JavaScript's generic Date parser. Values such as 1950 were interpreted as January 1, 1950, adding month and day precision that was not present in the record.

Impact

Records containing only a year now display that exact year. Records containing full dates retain the existing readable full-date format.

Validation

  • npm test -- --run src/__tests__/components/resource/FullDetailsTable.test.tsx
  • ESLint on the changed component and test
  • Prettier check on the changed component and test
  • npm run build

Closes #237

@ewlarson
ewlarson marked this pull request as ready for review August 19, 2026 21:37
@ewlarson
ewlarson merged commit 34e940e into develop Aug 19, 2026
16 of 17 checks passed
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.

Date issued field: display yyyy only for most items

1 participant