Description
The CSL JSON schema supports expressing seasons using:
- A dedicated
season property (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:
Actual output:
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 in date-parts, with localization via <term name="season-04">Winter</term> and related terms.
- Optionally support the
season property 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:
Description
The CSL JSON schema supports expressing seasons using:
seasonproperty (e.g."season": 4)date-parts(e.g.[2009, "season-04"])Reference:
https://github.com/citation-style-language/schema/blob/master/schemas/input/csl-data.json
However,
citeproc-phpcurrently does not render either form correctly. If"season-0X"is used indate-parts, it is treated as an invalid or unknown month, and ifseasonis 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:
Expected output:
Winter 2009Actual output:
Expected Behavior
The processor should interpret
"season-04"as a valid placeholder indate-parts(likeciteproc-js), and/or render theseasonproperty ifdate-partsdoes not contain a second value.Environment
"seboettg/citeproc-php": "2.6.2"Proposed Fix
"season-0X"tokens indate-parts, with localization via<term name="season-04">Winter</term>and related terms.seasonproperty as a fallback or primary field when only the year is given.This would bring
citeproc-phpinto alignment with the CSL JSON specification and improve compatibility with existing citation processors likeciteproc-js.Links: