-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: accept date without time #125
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,7 +100,7 @@ void can_parse() { | |
.name("pdf") | ||
.build()) | ||
.uri("uri") | ||
.created("2025-03-19T13:37:05.472970") | ||
.created("2025-03-19") | ||
.lastModified("2025-03-19T13:37:05Z") | ||
.build())) | ||
.contactPoint(List.of( | ||
|
@@ -194,7 +194,7 @@ void can_parse() { | |
.id("resource_id") | ||
.title("resource_name") | ||
.description("resource_description") | ||
.createdAt(parse("2025-03-19T13:37:05Z")) | ||
.createdAt(parse("2025-03-19T00:00Z")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (testing): Test case updated to cover new date format, but edge cases are missing While the test has been updated to use the new date format without time, it would be beneficial to add more test cases covering all three date formats mentioned in the PR description. This ensures that the new parsing logic handles all scenarios correctly.
|
||
.modifiedAt(parse("2025-03-19T13:37:05Z")) | ||
.format(ValueLabel.builder() | ||
.value("pdf") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Consider extracting date parsing logic to a common utility method
This same date parsing logic appears in both CkanDatasetsRepository and PackageShowMapper. To improve maintainability and reduce duplication, consider creating a shared utility method for this date parsing operation.