title: T-SQL - Get start and end date based on week number.
body: <p>Our business considers a week from (Monday - Sunday). I need to write a T-SQL function, which passes in year, week no as parameters and it will return the start and end date of that week. However I've seen many examples but the problem lies within the year overlapping.  </p>
  
  <p>e.g December 26, 2011 (Monday) - January 01, 2012 (Sunday)... &lt;&lt; Would want to consider this as the last week of 2011. </p>
  
  <p>And also in T-SQL the datepart(ww,DATE) considers Sunday as the start of the week?? </p>
  
  <p>Or Am I better creating my own table with the week no and storing its start and end date? </p>