From 68efec5c01f68b9108ed5158e433cb92784681e4 Mon Sep 17 00:00:00 2001 From: Emiliano Heyns Date: Sat, 16 Mar 2024 13:08:52 +0100 Subject: [PATCH] fixes #2816 --- content/dateparser.ts | 2 +- ...BibTeX does not export collections #901.bibtex | 3 +-- ...e range crashes citekey generator #1227.bibtex | 4 ---- test/fixtures/export/date ranges #747+#746.bibtex | 15 +++++---------- 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/content/dateparser.ts b/content/dateparser.ts index 83785c2003..c6f8104afb 100644 --- a/content/dateparser.ts +++ b/content/dateparser.ts @@ -401,7 +401,7 @@ export function strToISO(str: string): string { } export function dateToISO(date: ParsedDate): string { - if (date.type === 'interval') return `${dateToISO(date.from)}/${dateToISO(date.to)}` + if (date.type === 'interval') return `${dateToISO(date.from)}/${dateToISO(date.to)}`.replace(/^[/]$/, '') if (typeof date.year !== 'number') return '' diff --git a/test/fixtures/export/Better BibTeX does not export collections #901.bibtex b/test/fixtures/export/Better BibTeX does not export collections #901.bibtex index 199f47e24c..d46f295c5f 100644 --- a/test/fixtures/export/Better BibTeX does not export collections #901.bibtex +++ b/test/fixtures/export/Better BibTeX does not export collections #901.bibtex @@ -521,8 +521,7 @@ assur{\'e}e par les services de traduction de l'Universit{\'e} McGill.}, @article{Prior-1985-WhatWrongEtiological, title = {What Is {{Wrong}} with {{Etiological Accounts}} of {{Biological Function}}?}, author = {Prior, Elizabeth W.}, - year = {1985}, - month = jul, + year = {1985-07/1985-10}, journal = {Pacific Philosophical Quarterly}, volume = {66}, pages = {310--328}, diff --git a/test/fixtures/export/Open date range crashes citekey generator #1227.bibtex b/test/fixtures/export/Open date range crashes citekey generator #1227.bibtex index 06dbefabc0..06517da6f6 100644 --- a/test/fixtures/export/Open date range crashes citekey generator #1227.bibtex +++ b/test/fixtures/export/Open date range crashes citekey generator #1227.bibtex @@ -1,11 +1,7 @@ - @article{Shelahcombinatorialproblemstability, title = {A Combinatorial Problem; Stability and Order for Models and Theories in Infinitary Languages}, author = {Shelah, Saharon}, - year = {undefined}, journal = {Pacific Journal of Mathematics}, volume = {41}, pages = {247--261} } - - diff --git a/test/fixtures/export/date ranges #747+#746.bibtex b/test/fixtures/export/date ranges #747+#746.bibtex index 9f8970f4d8..5b5192f5a2 100644 --- a/test/fixtures/export/date ranges #747+#746.bibtex +++ b/test/fixtures/export/date ranges #747+#746.bibtex @@ -1,8 +1,7 @@ @article{Adams2015, title = {746: {{The}} Physical Volcanology of the 1600 Eruption of {{Huaynaputina}}, Southern {{Peru}}}, author = {Adams, Nancy K and DeSilva, Shanaka L and Self, Steven and Salas, Guido and Schubring, Steven and Permenter, Jason L and Arbesman, Kendra}, - year = {2015}, - month = jun, + year = {2015-06-22/2015-06-26}, journal = {Bulletin of Volcanology}, volume = {62}, pages = {493--518}, @@ -13,8 +12,7 @@ @article{Adams2017, title = {747: {{The}} Physical Volcanology of the 1600 Eruption of {{Huaynaputina}}, Southern {{Peru}}}, author = {Adams, Nancy K and DeSilva, Shanaka L and Self, Steven and Salas, Guido and Schubring, Steven and Permenter, Jason L and Arbesman, Kendra}, - year = {2017}, - month = jun, + year = {2017-06-18/2017-06-23}, journal = {Bulletin of Volcanology}, volume = {62}, pages = {493--518}, @@ -26,8 +24,7 @@ title = {Identifying Faulty Traffic Detectors with {{Floating Car Data}}}, booktitle = {2011 {{IEEE Forum}} on {{Integrated}} and {{Sustainable Transportation Systems}}}, author = {{P. Widhalm} and {H. Koller} and {W. Ponweiser}}, - year = {2011}, - month = jun, + year = {2011-06-29/2011-07-01}, pages = {103--108}, doi = {10.1109/FISTS.2011.5973643}, abstract = {Virtually all ITS applications rely on accurate traffic data. Identification of faulty detectors is thus vital for their reliability and efficiency. Most existing approaches solely use current and historical data of single or adjacent detectors and are based on empirical thresholds. We present a method for fault detection using Floating-Car Data (FCD) as independent source of information which allows to distinguish changed traffic conditions from sensor faults. Fault detection is based on residuals of a nonlinear regression model fitted to detector readings and FCD traffic speeds. Instead of applying rule-of-thumb thresholds we employ a statistical test, where thresholds result naturally from historical data, sample sizes and required fault detection accuracy. We provide a theoretical framework for fault detectability analysis and empirically evaluate the fault detection capability of our approach using data obtained from a microscopic traffic simulation.}, @@ -38,8 +35,7 @@ title = {A Tour of the Worm}, booktitle = {Proceedings of the {{Winter}} 1989 {{USENIX Conference}}}, author = {Seeley, Donn}, - year = {1989}, - month = jan, + year = {1989-01-30/1989-02-03}, pages = {287--304}, publisher = {USENIX}, address = {San Diego, California, USA} @@ -49,8 +45,7 @@ title = {A Language/Action Perspective on the Design of Cooperative Work}, booktitle = {Proceedings of the 1986 {{ACM Conference}} on {{Computer-supported Cooperative Work}} ({{CSCW}} '86)}, author = {Winograd, Terry}, - year = {1986}, - month = dec, + year = {1986-12-03/1986-12-05}, pages = {203--220}, publisher = {ACM}, address = {Austin, TX},