aboutsummaryrefslogtreecommitdiff
path: root/test/command/biblatex-dates.md
blob: 85d424dfb7124ff95311dfef5c5e26208583362f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
```
% pandoc -f biblatex -t markdown -s
@comment{
    - Dates
    - Not included in tests:
        - malformed dates and date ranges
        - literal dates ("13th century"; not supported by biblatex)
        - seasons (would have to come from parsing the issue field)
        - uncertain dates (use "doubtfuldate" from biblatex-apa?)
        - dates with single-digit day or month (not supported by biblatex)
        - negative dates (not supported by biblatex)
    - Note: biblatex supports years < 1000 but only if padded with leading zeros
    - TODO:
        - either biblio2yaml or, probably better, citeproc should strip leading zeros
         from days and months (CSL can add leading zeros to its output, but not remove
         them when they are in its input data)
}

@article{year-month-old,
    Author = {Author, Al},
    Journal = {Journal},
    Month = aug,
    Title = {Year and Month, bibtex style, supported by biblatex for backwards compatibility},
    Year = {1999}}

@article{year-month-new,
    Author = {Author, Al},
    Journal = {Journal},
    Month = {08},
    Title = {Year and Month, biblatex style; note that biblatex does not have a ``day'' field},
    Year = {1999}}

@article{dates,
    Author = {Author, Al},
    Date = {2012-12-13},
    Eventdate = {2011-10-03},
    Journal = {Journal},
    Month = may,
    Origdate = {1888-10-01},
    Title = {Dates, default biblatex style; year, month to be ignored if date exists},
    Urldate = {1999-05-23},
    Year = {9999}}

@article{date-ranges-different-years,
    Author = {Author, Al},
    Date = {1999-10-14/2010-01-23},
    Eventdate = {1999-12/2000-01},
    Journal = {Journal},
    Origdate = {1888-01-02/1913-12-13},
    Title = {Date ranges; different years},
    Urldate = {2012-10-12/2013-01-31}}

@article{date-ranges-same-year,
    Author = {Author, Al},
    Date = {1999-10-14/1999-10-15},
    Eventdate = {1999-10/1999-11},
    Journal = {Journal},
    Origdate = {1888-01-02/1888-12-13},
    Title = {Date ranges; same year},
    Urldate = {2012-10-31/2012-11-01}}

@article{date-ranges-open,
    Author = {Author, Al},
    Date = {1999-10-14/},
    Eventdate = {1999-10/},
    Journal = {Journal},
    Origdate = {1888-01-02/},
    Title = {Date ranges, open-ended},
    Urldate = {2012-10-31/}}

@article{dates-very-old,
    Author = {Author, Al},
    Date = {0712-12-13},
    Eventdate = {0311-10-03},
    Journal = {Journal},
    Month = may,
    Origdate = {0088-10-01},
    Title = {Dates, year less than 1000},
    Urldate = {0999-12-14}}

^D
---
nocite: "[@*]"
references:
- author:
  - family: Author
    given: Al
  container-title: Journal
  id: year-month-old
  issued: 1999-08
  title: Year and month, bibtex style, supported by biblatex for
    backwards compatibility
  type: article-journal
- author:
  - family: Author
    given: Al
  container-title: Journal
  id: year-month-new
  issued: 1999-08
  title: Year and month, biblatex style; note that biblatex does not
    have a "day" field
  type: article-journal
- accessed: 1999-05-23
  author:
  - family: Author
    given: Al
  container-title: Journal
  event-date: 2011-10-03
  id: dates
  issued: 2012-12-13
  original-date: 1888-10-01
  title: Dates, default biblatex style; year, month to be ignored if
    date exists
  type: article-journal
- accessed: 2012-10-12/2013-01-31
  author:
  - family: Author
    given: Al
  container-title: Journal
  event-date: 1999-12/2000-01
  id: date-ranges-different-years
  issued: 1999-10-14/2010-01-23
  original-date: 1888-01-02/1913-12-13
  title: Date ranges; different years
  type: article-journal
- accessed: 2012-10-31/2012-11-01
  author:
  - family: Author
    given: Al
  container-title: Journal
  event-date: 1999-10/1999-11
  id: date-ranges-same-year
  issued: 1999-10-14/1999-10-15
  original-date: 1888-01-02/1888-12-13
  title: Date ranges; same year
  type: article-journal
- accessed: 2012-10-31/
  author:
  - family: Author
    given: Al
  container-title: Journal
  event-date: 1999-10/
  id: date-ranges-open
  issued: 1999-10-14/
  original-date: 1888-01-02/
  title: Date ranges, open-ended
  type: article-journal
- accessed: 0999-12-14
  author:
  - family: Author
    given: Al
  container-title: Journal
  event-date: 0311-10-03
  id: dates-very-old
  issued: 0712-12-13
  original-date: 0088-10-01
  title: Dates, year less than 1000
  type: article-journal
---


```