How to get the week number from a date
The code below adds two new functions to the Date object. Add this to your source code.
To get the ISO week number (1-53) of a Date object, mydate, use
To get the corresponding four-digit year, use