Thanks for this simple and effective code.
Is there a similar easy way to get the year of that week we are looking for? Or the "ISO-year"?
Lets say I put in the date '2014-12-31' and get the ISO-WeekNumber = 1, I would also like to get the what year that weeknumber is for (in this case 2015).
I guess I can try to find this out, but if you guys already have some really efficient code to do this, it would be appreciated.