Date range: March 1,–2, 2011 instead of March 1–2, 2011 #18
Comments
Yes, this was introduced by #12. Previous to the fix to #12, pandoc-citeproc simply stripped the suffix entirely from the first day in a date range. #12 changed that behavior so that the suffix is merely trimmed of trailing space. In your example, the suffix comes from
Here is the corresponding bit of
I'm at a loss as to how pandoc-citeproc can distinguish between these cases, stripping the suffix in the en-US case but leaving it on in the da-DK case. I'm actually wondering why the comma suffix is there in the US case. Is that perhaps an error? |
What seems to work is to revert #12 and use a patched
So my suggestion would be to revert #12 and recommend the use of patched locale files for the time being. I don't think the comma suffix in en-US is an error, without it you wouldn't get "June 17, 2001" but "June 17 2001". It seems that CSL did not think of distinguishing between suffixes that are directly coupled to date-parts and "other" punctuation such as the comma in en-US. A cleaner solution might have been using something like
... but that does not work, at least not with pandoc-citeproc, and since Zotero doesn't have date ranges, I haven't been able to test this elsewhere yet. |
[EDIT:] I ran date_TextFormFulldateDayRange-NB-da-DK.txt:
date_TextFormFulldateDayRange-NB-en-US.txt:
|
Interesting. What happens if you change the input file just slightly:
|
I realized that what I ran was actually a test of the new pandoc-citeproc, not of citeproc-js (see edit above). Sorry. Concerning pandoc-citeproc, this just confirms what we already knew. Would you happen to know how to run the test suite on citeproc-js? |
I managed to test citeproc-js (on installation see http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#getting-the-citeproc-js-sources and http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#running-the-test-suite) with the two test files I posted here earlier, plus a version of The en-US test passes, but, interestingly enough, citeproc-js fails both da-DK tests, with and without Again, I'd like to propose reverting the "fix" for #12 for the moment, to make en-US work correctly again. (And at least in pandoc, one shoud then be able to patch locale files with |
Eventually, this turns out not to be a processor bug, but a locale file bug: Days, and the numerical form of months in Danish, German, and others are ordinal numbers (see https://en.wikipedia.org/wiki/Ordinal_indicator#Croatian.2C_Czech.2C_Danish.2C_Estonian.2C_Faroese.2C_German.2C_Hungarian.2C_Icelandic.2C_Latvian.2C_Norwegian.2C_Polish.2C_Slovak.2C_Slovene.2C_Serbian.2C_Turkish). Thus, in CSL, the ordinal form should be used instead of the numerical form plus the suffix ".". Both happen to be rendered identically in locales using a dot as ordinal indicator, except, that is, when date ranges are involved. This means that, instead of
(from
Hence, the "fix" for #12 should definitely be reverted, the pre-#12 pandoc-citeproc seems to work well when locale files are fixed instead. The only thing that will not be possible within the limits of the current CSL specs is to have ordinals with leading zeros. I will report this issue to the xbiblio list. |
Is |
It seems you already fixed Others that contain one or more date-part suffix elements starting with a dot and thus seem likely candidates are |
+++ nickbart1980 [Jan 06 14 00:16 ]:
Here the dot only occurs in numeric dates (not textual).
Leading 0s.
. is not ordinal here.
I've fixed this one.
. is not ordinal here.
Fixed.
. only occurs in numeric dates.
. is not ordinal.
. is not ordinal.
. is not ordinal.
. is not ordinal.
. is not ordinal. |
Great. However, I tend to think that dots in numerical dates denote ordinals, too. I could not find much on this so far, though, with the exception of de-DE and de-AT: "The format d(d).m(m).(yy)yy (using dots (which denote ordinal numbering)) is the traditional German date format." (http://en.wikipedia.org/wiki/Date_format_by_country) |
I guess the question is whether in numerical dates with ranges 1.-3.4.99 I don't know the style. +++ nickbart1980 [Jan 06 14 11:36 ]:
|
Probably introduced by the fix for #12 (at least I don't remember seeing this before):
Result:
The text was updated successfully, but these errors were encountered: