I need to get the weeknumber of a date.
I know this is asked many times before but all the answers here are not usefull for me since they return the dotnet weeknumber or the iso 8601 weeknumber.
What I need is a bit more challenging.
Let me explain with sample data that will be the easiest :
input date desired weeknumber
01-jan-2012 1
02-jan-2012 2
31-dec-2012 52
01-jan-2013 1
06-jan-2013 1
07-jan-2013 2
31-dec-2013 52
01-jan-2014 1
05-jan-2014 1
06-jan-2014 2
I hope this makes clear what I need.
Its like if you would write weeknumbers on a printed calendar but with the first/Last week splitted to 1/52 in stead of 53
Searching in google returns lots of answers like this one example of answer, but none of them I found returns these result so I am hoping someone can help me with this or point me in the right direction.
EDIT : another way to explain it is this :
look at it as you would say to another person, the last day of the year a person would say it is week 52 and the first day of the year a person would say week 1. A person would never say it is week 53.
For 02-jan-2012 a person would say we are in week 2 of this year, not in week 1
EDIT : I finally convinced my employer that this is not practical and even impossible. The answers and comments in this thread is what I used for the convincing so you did all help me well afterall