FinancialYear
A gem tells you what financial year is it now, and also the date range of it
How to user it
klass = FinancialYear::FinancialYear.config(
start_month = 4,
start_day = 1,
end_month = 3,
end_day = 31
)
financial_year = klass.for_year(2017)
financial_year.financial_year_range
financial_year.ytd_range
today = Date.today
start_last_year = today.month >= FinancialYear.start_month ? today.year - 1 : today.year - 2
last_year = FinancialYear.for_year(start_last_year).financial_year_range
current_year_ytd = FinancialYear.for_year(start_last_year + 1).ytd_range