Advertisement
Guest User

Untitled

a guest
May 19th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.  
  5. </head>
  6. <body>
  7.  
  8. <p id="demo"></p>
  9.  
  10. <script type="text/javascript">
  11. var today, someday, text;
  12. today = new Date();
  13. someday = new Date();
  14. someday.setFullYear(2100, 1, 10);
  15.  
  16.  
  17. if (someday > today) {
  18. text = "Today is before 10th February 2100";
  19. }
  20. else {
  21. text = "Today is after 10th February 2100"
  22. }
  23. document.getElementById("demo").innerHTML = text;
  24.  
  25. </script>
  26.  
  27. </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement