Extends Date and Time class to provide fiscal date helper methods.
Add the following line to your Gemfile:
gem 'acts_as_fiscal', git: '[email protected]:kentan88/acts_as_fiscal.git'
Override the constant FY_START_MONTH anywhere under your initializers directory. Default value is 4 (April).
To get the financial year based on today's date.
Date.today.financial_year
To get the start date of the financial year based on today's date.
Date.today.beginning_of_financial_year
To get the end date of the financial year based on today's date.
Date.today.end_of_financial_year
To get the financial quarter of the financial year based on today's date.
Date.today.financial_quarter