Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add shift parameter to quarters function when fiscal does not match calendar year #427
A calendar year starts in January, but many places have fiscal years that start either before or after the calendar year. For example, a fiscal year might start in November, which means Q1 is Nov - Jan and Q4 is Aug - Oct.
The shift parameter causes two major changes, one is that the shift changes the quarter for a particular month, as described above. 2nd change is that it also increases the year by 1 if the quarter would 'normally' be Q4 but is now Q1 due to a shift. E.g. December 2015 is normally 2015.Q4 but would be reported as 2016.Q1 if the Fiscal Year started in December.
Created new test cases as well, as I could not find any for the quarter accessor.
Current coverage is 78.78%
@@ master #427 diff @@ ========================================== Files 42 42 Lines 2372 2376 +4 Methods 0 0 Messages 0 0 Branches 0 0 ========================================== + Hits 1850 1872 +22 + Misses 522 504 -18 Partials 0 0
Sorry, I missed this pull somehow.
Could we find a better name for "shift" ? It's not imidiately clear which direction it shifts. For instance are
Would we be better off with