New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shift parameter to quarters function when fiscal does not match calendar year #427

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
@PedramNavid

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.

Updated quarters function, test case, and documentation to introduce …
…shift parameter when fiscal years do not match calendar years
@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Jul 5, 2016

Current coverage is 78.78%

Merging #427 into master will increase coverage by 0.79%

@@             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          

Powered by Codecov. Last updated by c0096b7...2b53988

Current coverage is 78.78%

Merging #427 into master will increase coverage by 0.79%

@@             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          

Powered by Codecov. Last updated by c0096b7...2b53988

@vspinu

This comment has been minimized.

Show comment
Hide comment
@vspinu

vspinu Jul 20, 2016

Member

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 shifts of -2 and 10 equivalent?

Would we be better off with year_start parameter instead? You pass 10 or "November" and get the same result?

Member

vspinu commented Jul 20, 2016

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 shifts of -2 and 10 equivalent?

Would we be better off with year_start parameter instead? You pass 10 or "November" and get the same result?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment