Skip to content

Commit

Permalink
this?
Browse files Browse the repository at this point in the history
  • Loading branch information
FallBackITA27 committed Apr 11, 2024
1 parent b3f2721 commit 8304516
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions mkwpp-parser/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ document.getElementById("readInput").addEventListener("click", async function()
currentSubmission.errString = "Cannot parse date";
};
for (let keyword of keywords.slice(1, keywords.length)) {
let kw = keyword.replace(/,/g, "");
let kw = keyword.replace(/,/g, "").replace(/th/g, "").replace(/rd/g, "").replace(/nd/g, "").replace(/st/g, "");
if (kw.length === 4) {
year = kw;
continue;
Expand All @@ -98,10 +98,8 @@ document.getElementById("readInput").addEventListener("click", async function()
}
if (_break) continue;
console.log(kw);
let kwfiltered = kw.replace(/th/g, "").replace(/rd/g, "").replace(/nd/g, "").replace(/st/g, "");
console.log(kwfiltered);
console.log(kwfiltered.padStart(2,"0"));
date = kwfiltered.padStart(2,"0");
console.log(kw.padStart(2,"0"));
date = kw.padStart(2,"0");
};
currentSubmission = {
name: "",
Expand Down

0 comments on commit 8304516

Please sign in to comment.