title: JavaScript: Weeks per year
body: <p>In javascript, how can I find out how many weeks a given year has?
  Getting the weeknumber from year-dec-31 will fail since that can result in week 1.</p>
  
  <p>This question <a href="https://stackoverflow.com/questions/8723862/calculate-number-of-weeks-in-a-given-year">calculate number of weeks in a given year</a> sort of answers it, but is there any neat way of calculating this in JS?</p>