-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 the representation of season in Biblatex date field. #12537
base: main
Are you sure you want to change the base?
Conversation
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.
JUnit tests are failing. In the area "Some checks were not successful", locate "Tests / Unit tests (pull_request)" and click on "Details". This brings you to the test output.
You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.
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.
JUnit tests are failing. In the area "Some checks were not successful", locate "Tests / Unit tests (pull_request)" and click on "Details". This brings you to the test output.
You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.
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.
JUnit tests are failing. In the area "Some checks were not successful", locate "Tests / Unit tests (pull_request)" and click on "Details". This brings you to the test output.
You can then run these tests in IntelliJ to reproduce the failing tests locally. We offer a quick test running howto in the section Final build system checks in our setup guide.
Very good work! I would like to see some more tests, but otherwise on the first look it does a good first impression. |
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.
Some minor comments.
Please also add a CHANGELOG.md entry
if (season == null) { | ||
return Optional.empty(); | ||
} | ||
return Optional.of(season); |
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.
Please use Optional.ofNullable
if (season != null) { | ||
return "Date{" + | ||
"date=" + formattedDate + ", " + | ||
"season=" + season + | ||
'}'; | ||
} |
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.
Why a different format then the others?
Isn't there a compact form (similar to DateTimeFormatter.ISO_DATE_TIME.format
or other results here?)
Action point: Either use a compact form or add a Java comment that there is no compact form
Fixes #12437
Description
When adding an entry like
@Article{Article, date = {2025-21} }
, the value 21 is interpreted as spring and added to theyeardivision
entry field, rather than being treated as an out-of-range month and throwing an exception.For reference:

Demonstration
Existing problems
YearDivision
orSeason
as the class name? TheBibLaTeX
documentation usesYearDivision
, but it seems thatYearDivision
might also include some other values.shortName
, is thegetJabRefFormat
method still necessary?TODO
Since I am a beginner in bibliography management and not certain whether my approach is correct, I have only implemented it preliminarily. If you think it is acceptable, I will proceed to finish the following TODO items:
Season
class.Date
class, such astoString
,equals
, andhashCode
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if change is visible to the user)