Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

biblatex has adopted EDTF as a new date format #240

Closed
njbart opened this issue Jun 20, 2016 · 1 comment
Closed

biblatex has adopted EDTF as a new date format #240

njbart opened this issue Jun 20, 2016 · 1 comment

Comments

@njbart
Copy link
Contributor

njbart commented Jun 20, 2016

biblatex has adopted a new date format: EDTF Level 0 and 1, which is basically a superset of the ISO 8601-based format biblatex has been using so far.

New biblatex docs on this: https://github.com/plk/biblatex/blob/dev/doc/latex/biblatex/biblatex.tex#L1601 ff.

New elements

Level 0

  • Time
    • Examples:
      • 2001-02-03T09:30:01
      • 2004-01-01T10:10:10Z
      • 2004-01-01T10:10:10+05:00
    • My recommendations for pandoc-citeproc:
      • Disregard any time parts, for the time being.
  • Negative dates
    • EDTF assumes astronomical numbering, which includes the year zero (where year “0” is “1 BC/BCE”) and negative years (where year “-1” is “2 BC/BCE”, year “-99” is “100 BC/BCE” etc.)
    • My recommendations for pandoc-citeproc:
      • The CSL JSON database format assumes BC/BCE numbering but uses (somewhat problematically) a minus sign instead of “BC” or “BCE”.
      • Hence EDTF 0 must be mapped to CSL JSON -1 (in order to appear as “1 BCE” in pandoc’s output), and EDTF -99 to CSL JSON -100 etc.

Level 1

  • Uncertain/approximate
    • Examples:
      • 1984?
      • 2004-06?
      • 2004-06-11?
      • 1984~
      • 1984?~
    • My recommendations for pandoc-citeproc:
      • If there is a ~, set the CSL JSON/YAML circa flag.
      • disregard ?, for the time being.
  • Unspecified
    • Examples:
      • 199u
      • 19uu
      • 1999-uu
      • 1999-01-uu
      • 1999-uu-uu
    • My recommendations for pandoc-citeproc:
      • biblatex maps 199u to 1990/1999, and 19uu to 1900/1999, and sets flags such as yearindecade; pandoc-citeproc could do the former, too (but of course not the latter); as to month and day uu parts, I’d say pandoc-citeproc could simply ignore these.
  • Extended Interval (L1)
    • Examples:
      • 2004-06-01/unknown
      • 2004-01-01/open
      • 1984~/2004-06
      • 1984/2004-06~
      • 1984?/2004?~
    • My recommendations for pandoc-citeproc:
      • Accept unknown and open.
      • If there is a ~ anywhere in the string, set the CSL JSON/YAML circa flag.
      • Disregard ?, for the time being.
  • Year Exceeding Four Digits (L1)
    • Examples:
      • y170000002
      • y-170000002
    • My recommendations for pandoc-citeproc:
      • Remove the y, adjust negative years as above.
  • Season
    • Examples:
      • 2001-21, 2001-22, 2001-23, 2001-24
    • My recommendations for pandoc-citeproc:
      • Map the season parts to the CSL JSON season element as “Spring”, “Summer”, “Autumn”, “Winter”, [EDIT] “1”, “2”, “3”, “4”, respectively (see citeproc-js specs).

Use EDTF for CSL YAML?

Finally, it might be a good idea to start using the EDTF date format in CSL YAML, too. Besides being a widely adopted standard, it’s much shorter (e.g., one line vs seven for a YMD interval).

(I have heard EDTF-friendly noises from the CSL and citeproc-js sides, too; but while we’re relatively free to (re)define CSL YAML, for the time being of course we have to stick to the current CSL JSON format conventions.)

@njbart
Copy link
Contributor Author

njbart commented Sep 24, 2016

biblatex 3.6 is now out of beta. Here are a few examples of new EDTF date strings in biblatex that are currently not parsed correctly by pandoc-citeproc -y. (From the biblatex 3.6 manual, Table 3, p. 37 and Table 5, p. 38.)


@article{item3-3, date={1998/unknown}}

Actual output:

- id: item3-3
  type: article-journal
  issued:
  - year: '1998'
  - year: unknown

Expected output:

- id: item3-3
  type: article-journal
  issued:
  - year: '1998'
  - {}

@article{item3-4, date={1999/open}}

Actual output:

- id: item3-4
  type: article-journal
  issued:
  - year: '1999'
  - year: open

Expected output:

- id: item3-4
  type: article-journal
  issued:
  - year: '1999'
  - {}

@article{item3-10, date={2004-04-05T14:34:00}}

Actual output:

- id: item3-10
  type: article-journal
  issued:
  - year: '2004'
    month: '4'
    day: 5T14:34:00

Expected output (time not supported in CSL, needs to be discarded):

- id: item3-10
  type: article-journal
  issued:
  - year: '2004'
    month: '4'
    day: '5'

@article{item5-1, date={0000}}

Actual output:

- id: item5-1
  type: article-journal
  issued:
  - {}

Expected output (EDTF uses astronomical year count, with a year '0'; CSL JSON uses BCE/CE year count, without a year '0'; in CSL JSON, '-' is not an actual minus sign but should be understood as shorthand for 'BCE'):

- id: item5-1
  type: article-journal
  issued:
  - year: '-1'

@article{item5-2, date={-0876}}

Actual output:

- id: item5-2
  type: article-journal
  issued:
  - month: '876'

Expected output:

- id: item5-2
  type: article-journal
  issued:
  - year: '-877'

@article{item5-3, date={-0877/-0866}}

Actual output:

- id: item5-3
  type: article-journal
  issued:
  - month: '877'
  - month: '866'

Expected output:

- id: item5-3
  type: article-journal
  issued:
  - year: '-878'
  - year: '-867'

@article{item5-5, date={-0343-02}}

Actual output:

- id: item5-5
  type: article-journal
  issued:
  - month: '343'
    day: '2'

Expected output:

- id: item5-5
  type: article-journal
  issued:
  - year: '-344'
    month: '2'

@article{item5-8, date={1723~}}

Actual output:

- id: item5-8
  type: article-journal
  issued:
  - year: 1723~

Expected output (see https://web.archive.org/web/20150911220234/http://gsl-nagoya-u.net/http/pub/citeproc-doc.html for CSL JSON details):

- id: item5-8
  type: article-journal
  issued:
  - year: 1723
  - circa: 1

@article{item5-9, date={1723?}}

Actual output:

- id: item5-9
  type: article-journal
  issued:
  - year: 1723?

Expected output ('uncertain' not supported in CSL, needs to be discarded):

- id: item5-9
  type: article-journal
  issued:
  - year: 1723

@article{item5-10, date={1723?~}}

Actual output:

- id: item5-10
  type: article-journal
  issued:
  - year: 1723?~

Expected output ('uncertain' not supported in CSL, needs to be discarded):

- id: item5-10
  type: article-journal
  issued:
  - year: 1723
  - circa: 1

@article{item5-11, date={2004-22}}

Actual output:

- id: item5-11
  type: article-journal
  issued:
  - year: '2004'
    month: '22'

Expected output (EDTF seasons are 21, 22, 23, 24; CSL seasons are 1, 2, 3, 4):

- id: item5-11
  type: article-journal
  issued:
  - year: '2004'
    season: '2'

@article{item5-12, date={2004-24}}

Actual output:

- id: item5-12
  type: article-journal
  issued:
  - year: '2004'
    month: '24'

Expected output:

- id: item5-12
  type: article-journal
  issued:
  - year: '2004'
    season: '4'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant