This commit is contained in:
@@ -22,7 +22,7 @@ export default async function parseV1V2(downloadedFilePath) {
|
|||||||
await workbook.xlsx.readFile(downloadedFilePath);
|
await workbook.xlsx.readFile(downloadedFilePath);
|
||||||
const teacherMap = await parseTeachers();
|
const teacherMap = await parseTeachers();
|
||||||
|
|
||||||
const dateRegex = /^(pondělí|úterý|středa|čtvrtek|pátek|po|út|ut|st|čt|ct|pa|pá)\s+(\d{1,2})\.\s*(\d{1,2})\.\s*(\d{2}|\d{4})/i;
|
const dateRegex = /^(pondělí|úterý|středa|čtvrtek|pátek|po|út|ut|st|čt|ct|pa|pá)\s+(\d{1,2})\.\s*(\d{1,2})\.\s*(\d{4}|\d{2})/i;
|
||||||
|
|
||||||
// Get today's date for comparison
|
// Get today's date for comparison
|
||||||
function getCurrentDateObject() {
|
function getCurrentDateObject() {
|
||||||
@@ -203,7 +203,7 @@ export default async function parseV1V2(downloadedFilePath) {
|
|||||||
const data = {
|
const data = {
|
||||||
schedule: final,
|
schedule: final,
|
||||||
props: upcomingSheets.map((str) => {
|
props: upcomingSheets.map((str) => {
|
||||||
const dateMatch = str.match(/(\d{1,2})\.\s*(\d{1,2})\.\s*(\d{4})/);
|
const dateMatch = str.match(/(\d{1,2})\.\s*(\d{1,2})\.\s*(\d{4}|\d{2})/);
|
||||||
|
|
||||||
let date = null;
|
let date = null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user