Skip to content

Instantly share code, notes, and snippets.

@cba85
Created November 18, 2023 16:35
Show Gist options
  • Save cba85/314380ef71f24acbb691ce02eaa8d90d to your computer and use it in GitHub Desktop.
Save cba85/314380ef71f24acbb691ce02eaa8d90d to your computer and use it in GitHub Desktop.
Jours fériés API - IPI Toulouse IJVS020
(async () => {
const response = await fetch(
"https://calendrier.api.gouv.fr/jours-feries/metropole/2025.json"
);
const data = await response.json();
for (const day in data) {
const date = new Date(day);
console.log(
date.toLocaleDateString("fr-FR", {
weekday: "long",
year: "numeric",
month: "long",
day: "numeric",
})
);
}
})();
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script src="app.js" defer></script>
</head>
<body></body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment