Skip to content

Commit

Permalink
fix heure Cobalt
Browse files Browse the repository at this point in the history
  • Loading branch information
baudelotphilippe committed Dec 6, 2023
1 parent e49d5d5 commit 06893aa
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions scripts/redresseCobalt.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ const redresseCobalt = (infos) => {
if (mois < moisActuel) {
anneeActuelle++;
}

const zoneHeure = blocInfos.children[2].children[1].data;
event.startDate = `${anneeActuelle}-${mois}-${jour}T${reformatHeure(
zoneHeure
)}`;

event.name = blocHead.children[5].children[0].data;

event.description = $(".inscription").html();
Expand All @@ -48,14 +42,22 @@ const redresseCobalt = (infos) => {
if (lesInfos[ligneInfo].children?.length && lesInfos[ligneInfo].children[0]) {
const catInfos =
lesInfos[ligneInfo].children[0].parent.children[0].children[0].data;
console.log(catInfos)
// console.log(catInfos)
if (catInfos.includes("Organisateur")) {
event.organizer =
lesInfos[
ligneInfo
].children[0].parent.children[0].children[0].parent.next.data;
}
if (catInfos.includes("Heure")) {
const zoneHeure = lesInfos[
ligneInfo
].children[0].parent.children[0].children[0].parent.next.data

event.startDate = `${anneeActuelle}-${mois}-${jour}T${reformatHeure(
zoneHeure
)}`;

event.location.name =
lesInfos[
ligneInfo
Expand Down

1 comment on commit 06893aa

@vercel
Copy link

@vercel vercel bot commented on 06893aa Dec 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.