Skip to content

Commit

Permalink
Del broken code
Browse files Browse the repository at this point in the history
  • Loading branch information
RickCogley committed Dec 4, 2024
1 parent c60496f commit d82b158
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,3 @@ console.log("DENO_INSTALL:", envdenoinstall);
// console.log("env:", env);
// console.log(holidays2);
// console.log(holidays);

// test import holiday json file
import fh from "./_data/futureholidays.json" with { type: "json" };
const dateToMatch = "2024-12-28";
// Step 1: Filter the array to find the object(s) with the matching 'date'
const filteredData = fh.filter(item => item['Date in YYYY-MM-DD'] === dateToMatch);

// Step 2: Map the filtered results to return the desired value ('user name')
const holname = filteredData.map(item => item['Name']);
console.log("MATCHED HOLIDAY:");
console.log(holname);

0 comments on commit d82b158

Please sign in to comment.