title: How to create SQL custom 4-4-5 Finanical Period date table
body: <p>I'm trying to create a SQL script to generate custom financial date table for reporting between years 2010 - 2030. The calendar is loosely based on a 4-4-5 calendar except there are specific rules for periods. </p>
  
  <p>The rules are as follows;</p>
  
  <ul>
  <li>The fiscal year always starts on the 1 of January</li>
  <li>The fiscal year always ends on the 31 of December</li>
  <li>The last day of each fiscal period (month end) is always on a Saturday</li>
  <li>Fiscal quarters are aligned to the custom periods </li>
  </ul>
  
  <p>See examples below;</p>
  
  <p><strong>2016 Financial Calendar (Leap Year)</strong></p>
  
  <p><a href="https://i.stack.imgur.com/ZzDxJ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZzDxJ.jpg" alt="2016 Financial Calendar (Leap Year)"></a></p>
  
  <p><strong>2017 Financial Calendar</strong></p>
  
  <p><a href="https://i.stack.imgur.com/x7DOs.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x7DOs.jpg" alt="2017 Financial Calendar"></a></p>
  
  <p>I would really appreciate any guidance on creating this table with the usual date dimensions and the custom fiscal values of period and quarter.  </p>