Created
September 12, 2014 21:01
-
-
Save rumblestrut/efefc7971a48c550db43 to your computer and use it in GitHub Desktop.
Current date JavaScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <title>Current Date</title> | |
| <script type="text/javascript"> | |
| var d = new Date(); | |
| var current_date = d.getDate(); | |
| var current_month = d.getMonth() +1; | |
| var current_year = d.getFullYear(); | |
| document.write("Today is " + current_month + "-" + current_date + "-" + current_year); | |
| </script> | |
| <style type="text/css"> | |
| body { font-family: Arial, Helvetica, sans-serif; } | |
| </style> | |
| </head> | |
| <body> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment