lib/fiscal_year.rb in fiscal_year-0.4.0 vs lib/fiscal_year.rb in fiscal_year-0.5.0
- old
+ new
@@ -50,7 +50,23 @@
def quarters
# @type self: singleton(FiscalYear)
months.in_groups(4)
end
+
+ def increase_year_by_month(year, month)
+ if FiscalYear.cross_year_month?(month)
+ year + 1
+ else
+ year
+ end
+ end
+
+ def decrease_year_by_month(year, month)
+ if FiscalYear.cross_year_month?(month)
+ year - 1
+ else
+ year
+ end
+ end
end
end