-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Description
The CSL JSON schema supports expressing seasons using:
- A dedicated
seasonproperty (e.g."season": 4) - A seasonal token in
date-parts(e.g.[2009, "season-04"])
Reference:
https://github.com/citation-style-language/schema/blob/master/schemas/input/csl-data.json
However, citeproc-php currently does not render either form correctly. If "season-0X" is used in date-parts, it is treated as an invalid or unknown month, and if season is set separately, it is ignored entirely.
Steps to Reproduce
Use the following CSL JSON input:
{
"issued": {
"date-parts": [[2009, "season-04"]],
"season": 4
}
}With a CSL style such as:
<date variable="issued" form="text">
<date-part name="month" suffix=" "/>
<date-part name="year"/>
</date>Expected output:
Winter 2009Actual output:
Mar. 2009
Expected Behavior
The processor should interpret "season-04" as a valid placeholder in date-parts (like citeproc-js), and/or render the season property if date-parts does not contain a second value.
Environment
- citeproc-php version:
"seboettg/citeproc-php": "2.6.2" - PHP version: PHP 8.3.14
Proposed Fix
- Add support for parsing
"season-0X"tokens indate-parts, with localization via<term name="season-04">Winter</term>and related terms. - Optionally support the
seasonproperty as a fallback or primary field when only the year is given.
This would bring citeproc-php into alignment with the CSL JSON specification and improve compatibility with existing citation processors like citeproc-js.
Links: