Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <title>JS Bin</title>
- </head>
- <body>
- <script id="jsbin-javascript">
- // Premier mai => 5 (numero du moi) / 1
- // noel => 12 /25
- var nowMonth = new Date().getMonth();
- var nowDay = new Date().getDate();
- console.log("le mois d'aujourdhui est " + nowMonth);
- console.log("le jour d'aujoudhui est " + nowDay);
- var isChristmas = nowMonth == 11 && nowDay == 25;
- var isFirstMay = nowMonth == 4 && nowDay == 1;
- if (isChristmas || isFirstMay){
- console.log("la boutique est fermée");
- } else {
- console.log("la boutique est ouverte");
- }
- </script>
- <script id="jsbin-source-javascript" type="text/javascript">// Premier mai => 5 (numero du moi) / 1
- // noel => 12 /25
- var nowMonth = new Date().getMonth();
- var nowDay = new Date().getDate();
- console.log("le mois d'aujourdhui est " + nowMonth);
- console.log("le jour d'aujoudhui est " + nowDay);
- var isChristmas = nowMonth == 11 && nowDay == 25;
- var isFirstMay = nowMonth == 4 && nowDay == 1;
- if (isChristmas || isFirstMay){
- console.log("la boutique est fermée");
- } else {
- console.log("la boutique est ouverte");
- }
- </script></body>
- </html>
Add Comment
Please, Sign In to add comment