Skip to content

refactor: extract format-string date detection out of DateUtils - #1077

Open
nkuprins wants to merge 3 commits into
apache:mainfrom
nkuprins:refactor/extract-date-detection
Open

refactor: extract format-string date detection out of DateUtils#1077
nkuprins wants to merge 3 commits into
apache:mainfrom
nkuprins:refactor/extract-date-detection

Conversation

@nkuprins

@nkuprins nkuprins commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Closed: #1062

Purpose of the pull request

As title

What's changed?

  • Extracted date format detection: moved detection logic out of DateUtils into a dedicated ExcelDateFormatDetector package-private class.
  • Updated test references: adjusted DateUtilsTest to test date format detection via the newly extracted ExcelDateFormatDetector.

Checklist

  • I have read the Contributor Guide.
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

@skytin1004 skytin1004 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed this locally and ran the relevant tests, which all passed.

I confirmed that the date detection logic was moved without changes and that the existing public methods still work through DateUtils. The cache cleanup test also confirms that DateUtils.removeThreadLocalCache() clears the cache in the new class.

Since this refactoring moves the date detection logic without changing its behavior, I think the existing tests provide sufficient coverage. LGTM.

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.

[Enhancement] Extract format-string date detection out of DateUtils

2 participants