Skip to content

Conversation

FedericoRuzzier
Copy link
Contributor

List of Changes

  • fix date parser to accept also YYYY-MM-DD+00:00 format

Motivation and Context

Needed to adapt to some psp who put the wrong input

How Has This Been Tested?

Manually

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@FedericoRuzzier FedericoRuzzier requested a review from a team as a code owner October 17, 2025 15:21
@FedericoRuzzier FedericoRuzzier added the bug Something isn't working label Oct 17, 2025
Copy link
Contributor

This pull request does not contain a valid label. Please add one of the following labels: [major, minor, patch, patch, skip]

} catch (DateTimeParseException e2) {
throw new IllegalArgumentException("Date format not supported: " + dateStr);
}
try {
Copy link
Contributor

Choose a reason for hiding this comment

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

[google-java-format] reported by reviewdog 🐶

Suggested change
try {
try {
return LocalDateTime.parse(dateStr + "T00:00:00", DATE_TIME_FORMATTER);
} catch (DateTimeParseException e2) {
try {

Comment on lines +65 to +71
return LocalDateTime.parse(dateStr + "T00:00:00", DATE_TIME_FORMATTER);
} catch (DateTimeParseException e2) {
try {
return LocalDateTime.parse(dateStr.substring(0, 10) + "T00:00:00", DATE_TIME_FORMATTER);
} catch (DateTimeParseException e3) {
throw new IllegalArgumentException("Date format not supported: " + dateStr);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

[google-java-format] reported by reviewdog 🐶

Suggested change
return LocalDateTime.parse(dateStr + "T00:00:00", DATE_TIME_FORMATTER);
} catch (DateTimeParseException e2) {
try {
return LocalDateTime.parse(dateStr.substring(0, 10) + "T00:00:00", DATE_TIME_FORMATTER);
} catch (DateTimeParseException e3) {
throw new IllegalArgumentException("Date format not supported: " + dateStr);
}
return LocalDateTime.parse(dateStr.substring(0, 10) + "T00:00:00", DATE_TIME_FORMATTER);
} catch (DateTimeParseException e3) {
throw new IllegalArgumentException("Date format not supported: " + dateStr);

throw new IllegalArgumentException("Date format not supported: " + dateStr);
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

[google-java-format] reported by reviewdog 🐶

Suggested change
}
}
}

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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

Labels

bug Something isn't working size/small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant