apa-cv duplicate date
Closed this issue · 3 comments
Describe the bug
The date is duplicated in the output when using the Json and the Style:
Please fill in the following sections and provide as much information as possible. It will help us to reproduce the issue. Leave sections blank or remove them if they don't apply.
Which version of citeproc-java are you using?
Let us know which citeproc-java version you are using exactly so we can reproduce the issue.
Expected behavior
Isler, D., Hefti, C., Kirchhofer, K., & Dinkelmann, I. (2017, July). Promoting oral texts in kindergarten classrooms: Development of a new test to measure oral text abilities of kindergarten students. Paper presented at the 20th European Conference on Literacy. Madrid, July 3 - 6, 2017.
Actual behavior
Isler, D., Hefti, C., Kirchhofer, K., & Dinkelmann, I. (2017-072017-07). Promoting oral texts in kindergarten classrooms: Development of a new test to measure oral text abilities of kindergarten students. Paper presented at the 20th European Conference on Literacy. Madrid, July 3 - 6, 2017.
CSL input
{"id":"phtg_mods_00000279","type":"speech","language":"en","author":[{"family":"Isler","given":"Dieter","isInstitution":false},{"family":"Hefti","given":"Claudia","isInstitution":false},{"family":"Kirchhofer","given":"Katharina","isInstitution":false},{"family":"Dinkelmann","given":"Iris","isInstitution":false}],"issued":{"raw":"2017-07"},"event":"Paper presented at the 20th European Conference on Literacy. Madrid, July 3 - 6, 2017","title":"Promoting oral texts in kindergarten classrooms: Development of a new test to measure oral text abilities of kindergarten students","title-short":"Promoting oral texts in kindergarten classrooms"}
Used style and locale
citation style used the default locale (en-US?)
Example code/unit test
Example with citeproc-js
Spin up http-server in demo folder and open demo.html -> press Start button -> search for "Promoting"
Junit Test for citeproc-java
CSLItemData itemData = new CSLItemDataBuilder()
.id("phtg_mods_00000279")
.type(CSLType.SPEECH)
.language("en")
.author(
new CSLNameBuilder().given("Dieter").family("Isler").isInstitution(false).build(),
new CSLNameBuilder().given("Claudia").family("Hefti").isInstitution(false).build(),
new CSLNameBuilder().given("Katharina").family("Kirchhofer").isInstitution(false).build(),
new CSLNameBuilder().given("Iris").family("Dinkelmann").isInstitution(false).build()
)
.issued(new CSLDateBuilder().raw("2017-07").build())
.event("Paper presented at the 20th European Conference on Literacy. Madrid, July 3 - 6, 2017")
.title("Promoting oral texts in kindergarten classrooms: Development of a new test to measure oral text abilities of kindergarten students")
.titleShort("Promoting oral texts in kindergarten classrooms")
.build();
ListItemDataProvider itemDataProvider = new ListItemDataProvider(itemData);
CSL citeproc2 = new CSL(itemDataProvider, "https://raw.githubusercontent.com/citation-style-language/styles/master/apa-cv.csl");
citeproc2.setOutputFormat("text");
citeproc2.registerCitationItems(itemDataProvider.getIds(), true);
Bibliography biblio = citeproc2.makeBibliography();
String result = biblio.makeString();
Assert.assertEquals("Should match",
"Isler, D., Hefti, C., Kirchhofer, K., & Dinkelmann, I. (2017, July). Promoting oral texts in kindergarten classrooms: Development of a new test to measure oral text abilities of kindergarten students. Paper presented at the 20th European Conference on Literacy. Madrid, July 3 - 6, 2017.",
result);
If i change to new CSLDateBuilder().dateParts(2017, 7).build()
the Test still fails, but only because of the line ending.
Thanks for reporting this issue. I can confirm it. I will try to implement a fix and get back to you.
I've published a new version 3.0.0-beta.2, which should fix the issue.