Skip to content

Instantly share code, notes, and snippets.

@thatkookooguy
Created April 17, 2018 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thatkookooguy/7f3e8de2f438596009bb63760ffeabce to your computer and use it in GitHub Desktop.
Save thatkookooguy/7f3e8de2f438596009bb63760ffeabce to your computer and use it in GitHub Desktop.
get israeli office holidays from https://publicholidays.co.il/2018-dates/
var tbl = jQuery('.publicholidays tr').get().map(function(row) {
return jQuery(row).find('td').get().map(function(cell) {
return jQuery(cell).text();
});
}).map((holiday) => {
const regex = /\d{4}-\d{2}-\d{2}/g;
let match = regex.exec(holiday[0] || "");
let date = match ? match[0] : null;
let name = (holiday[2] || "").trim();
return {date: date, name: name }
}).slice(1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment