title: Mathematically calculating the fiscal year 5-4-4 schedule
body: <p>I am trying calculate the fiscal year and return the date when it is the end of a week on the 5-4-4 schedule.</p>
  
  <p>E.g. Fiscal year starts January 1st then I will return the date 5 weeks, 4 weeks, and another 4 weeks.  Then repeat 5 weeks, 4 weeks, 4 weeks until the end of the fiscal year then presumably restart it over again.</p>
  
  <p>How would you mathematically or programmatically go about doing this?</p>
  
  <p>I came up with a subtraction method, but wanted to see if anyone had a better solution:</p>
  
  <pre><code>52 - 47 = 5    | February 5th, 2018
  52 - 43 = 9    | March 5th, 2018
  52 - 39 = 13   | April 2nd, 2018
  52 - 34 = 18   | May 7th, 2018
  52 - 30 = 22   | June 4th, 2018
  52 - 26 = 26   | July 3rd, 2018
  52 - 21 = 31   | August 7th, 2018
  52 - 17 = 35   | September 4th, 2018
  52 - 13 = 39   | October 2nd, 2018
  52 - 8  = 44   | November 6th, 2018
  52 - 4  = 48   | December 4th, 2018
  52 - 0  = 52   | January 1st, 2019
  </code></pre>