25 lines
742 B
HTML
Executable file
25 lines
742 B
HTML
Executable file
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Document</title>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
|
|
function capitalize(string) {
|
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
}
|
|
|
|
let dt = new Date();
|
|
|
|
let dow = capitalize(Intl.DateTimeFormat('es-ES', { weekday: 'long' }).format(dt));
|
|
let month = capitalize(Intl.DateTimeFormat('es-ES', { month: 'long' }).format(dt));
|
|
|
|
alert("Hoy es " + dow + " " + dt.getDate() + " de " + month + " de " + dt.getFullYear());
|
|
|
|
</script>
|
|
</body>
|
|
</html> |