Skip to content

Commit

Permalink
Drop time from ISO date strings before parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
fbennett committed Dec 8, 2019
1 parent 3c17390 commit 18c6f96
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/util_dateparser.js
Expand Up @@ -286,6 +286,7 @@ CSL.DateParser = function () {
var yearIsNegative = false;
var lst;
if (txt) {
txt = txt.replace(/^(.*[0-9])T[0-9].*/, "$1");
// If string leads with a minus sign, strip and memo it.
if (txt.slice(0, 1) === "-") {
yearIsNegative = true;
Expand Down

0 comments on commit 18c6f96

Please sign in to comment.