1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| <!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta http-equiv="cache-control" content="public, max-age=60">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta name="author" content="Daniel Hagnoul">
<title>test</title>
<style>
* {
box-sizing: border-box;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/locale/fr.js"></script>
<script>
'use strict';
document.addEventListener( "DOMContentLoaded", ev => {
}, false );
window.addEventListener( "load", ev => {
moment.locale( "fr" );
let
dimanchePasser = moment().day(0), // dimanche 21
lundi = moment().day(1), // lundi 22
mardi = moment().day(2), // mardi 23
mercredi = moment().day(3), // mercredi 24
jeudi = moment().day(4), // jeudi 25
vendredi = moment().day(5), // vendredi 26
samedi = moment().day(6), // samedi 27
dimancheProchain = moment().day(7); // dimanche 28
console.log( dimanchePasser.format( "dddd YYYY-MM-DD" ) );
console.log( lundi.format( "dddd YYYY-MM-DD" ) );
console.log( mardi.format( "dddd YYYY-MM-DD" ) );
console.log( mercredi.format( "dddd YYYY-MM-DD" ) );
console.log( jeudi.format( "dddd YYYY-MM-DD" ) );
console.log( vendredi.format( "dddd YYYY-MM-DD" ) );
console.log( samedi.format( "dddd YYYY-MM-DD" ) );
console.log( dimancheProchain.format( "dddd YYYY-MM-DD" ) );
}, false );
</script>
</head>
<body> |
Partager