Created
November 18, 2023 16:35
-
-
Save cba85/314380ef71f24acbb691ce02eaa8d90d to your computer and use it in GitHub Desktop.
Jours fériés API - IPI Toulouse IJVS020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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", | |
}) | |
); | |
} | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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