Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/duffy/date.rb
Instance Method Summary collapse
-
#fiscal_year ⇒ Object
Return the fiscal year for a given date.
Instance Method Details
#fiscal_year ⇒ Object
Return the fiscal year for a given date. See config to set the start of your fiscal year. Example: Date.new(2015,10,1).fiscal_year => 2016
6 7 8 |
# File 'lib/duffy/date.rb', line 6 def fiscal_year (self < Date.new(year, Duffy.configuration.fiscal_month, Duffy.configuration.fiscal_day)) ? year : year + 1 end |