Skip to content

fix: normalize published year dates - #5422

Open
blue219 wants to merge 1 commit into
advplyr:masterfrom
blue219:agent/normalize-published-year
Open

blue219 wants to merge 1 commit into
advplyr:masterfrom
blue219:agent/normalize-published-year

Conversation

@blue219

@blue219 blue219 commented Aug 1, 2026

Copy link
Copy Markdown

Brief summary

Normalizes ISO-style dates submitted or scanned as a book's publish year to a four-digit year.

Which issue is fixed?

Fixes #2270

In-depth Description

The scanner normalizes metadata after source precedence is resolved. Manual metadata edits now accept ISO dates and the server normalizes them before persisting, so API clients follow the same rule.

Only values beginning with YYYY or YYYY- are normalized. publishedDate is unchanged.

How have you tested this?

  • npm test (359 passing)
  • Targeted unit tests for the normalizer, scanner, and manual update path
  • Manual Chrome test: entered 2013-02-01 in Publish Year and confirmed the saved value is 2013

Screenshots

Not included; this is a small metadata edit field behavior change.

@blue219
blue219 marked this pull request as ready for review August 1, 2026 11:20
@blue219 blue219 closed this Sep 30, 2026
@blue219
blue219 deleted the agent/normalize-published-year branch September 30, 2026 04:18
@blue219
blue219 restored the agent/normalize-published-year branch September 30, 2026 04:20
@blue219 blue219 reopened this Sep 30, 2026
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.

[Bug]: Published year not displaying on some scraped books if date is encoded as yyyy-mm-dd

1 participant