Fiscal Year and Quarter To Date in Python
>> import fiscalyear | |
>> fiscalyear.setup_fiscal_calendar(start_month=4) | |
>> year = fiscalyear.FiscalYear(2021) | |
>> quarter = fiscalyear.FiscalQuarter.current() | |
>> print(year.start.year) | |
>> print(year.start.month) | |
>> print(year.start.day) | |
>> print(quarter) | |
>> print(type(quarter)) | |
>> print(quarter.start) | |
>> print(quarter.end) | |
2020 | |
4 | |
1 | |
FY2021 Q1 | |
<class 'fiscalyear.FiscalQuarter'> | |
2020-04-01 00:00:00 | |
2020-06-30 23:59:59 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment