Created
April 28, 2010 20:23
-
-
Save juarezpaf/382656 to your computer and use it in GitHub Desktop.
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>JS Bin</title> | |
| <!--[if IE]> | |
| <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
| <![endif]--> | |
| <style> | |
| article, aside, figure, footer, header, hgroup, | |
| menu, nav, section { display: block; } | |
| </style> | |
| <script> | |
| Date.prototype.getWeek = function() { | |
| var onejan = new Date(this.getFullYear(),0,1); | |
| return Math.ceil((((this - onejan) / 86400000) + onejan.getDay()+1)/7); | |
| } | |
| var today = new Date(); | |
| var weekno = today.getWeek(); | |
| alert(weekno); | |
| | |
| </script> | |
| </head> | |
| <body> | |
| <p id="hello">Hello World</p> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment