title: Range on day of year
body: <p>Is there a python function which works well with day of year?</p>
  <p>e.g. if I do <code>range (200, 210)</code> it will work fine. However if I do <code>range (350, 10)</code>, I want the values from 350 to 365 and then from 1 to 9. How do I do that?</p>
  <p>I want a soln which works for both range(200, 210) and range (350, 10)</p>