This commit is contained in:
Philippe Torrel
2026-08-17 14:24:43 +02:00
parent 2f8cd0b61e
commit c7d26e1cd9
17 changed files with 1255 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Übung 05: FormatDate Fehler</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet" />
</head>
<body>
<main>
<div class="container py-5">
<h1>Übung 05: FormatDate Fehler</h1>
</div>
</main>
<script>
'use strict';
function formatDate(date) {
const options = { year: 'numeric', month: 'long', day: 'numeric' };
formatedDate = date.toLocaleDateString(undefined, options);
return formattedDate;
}
console.log(formatDate(new Date('2023-05-31'))); // => 'May 31, 2023'
console.log(formatDate(new Date('2024-01-01'))); // => 'January 1, 2024'
</script>
</body>
</html>