diff options
author | Joel Kronqvist <work.joelkronqvist@pm.me> | 2022-03-11 20:41:42 +0200 |
---|---|---|
committer | Joel Kronqvist <work.joelkronqvist@pm.me> | 2022-03-11 20:41:42 +0200 |
commit | 5ac7049a9d30733165cc212dee308163c2a14644 (patch) | |
tree | 92dbb85e2e3dc408d06b8cea6fbf32503482bbbb /dbparse.js | |
parent | 01f3f5f2ab89432a253c24f76227b8f6855d8446 (diff) | |
download | LYLLRuoka-5ac7049a9d30733165cc212dee308163c2a14644.tar.gz LYLLRuoka-5ac7049a9d30733165cc212dee308163c2a14644.zip |
Food scraping updation
Diffstat (limited to 'dbparse.js')
-rw-r--r-- | dbparse.js | 20 |
1 files changed, 2 insertions, 18 deletions
@@ -1,3 +1,5 @@ +const weekdayToNumber = require("./Functions/dateFuncs.js").weekdayToNumber; + function getCharAmount(s, c) { let n = 0; @@ -62,24 +64,6 @@ function parseCluttered(s) return s.replaceAll(".", "").replaceAll(" ", "").toUpperCase(); } -function weekdayToNumber(s) -{ - const weekdays = [ - /ma.*/i, - /ti.*/i, - /ke.*/i, - /to.*/i, - /pe.*/i, - /la.*/i, - /su.*/i - ]; - for(let day = 0; day < weekdays.length; day++) - { - if (s.match(weekdays[day])) - return day; - } -} - async function writeShifts(data, DB) { let deletions = await Promise.all([ |