Module: Periods::Modules::YearlyPeriod::InstanceMethods
- Defined in:
- lib/periods/modules/yearly_period.rb
Instance Method Summary collapse
- #days ⇒ Object
-
#next ⇒ Object
25.06.2015 => 25.06.2016.
-
#previous ⇒ Object
25.06.2015 => 25.06.2014.
Instance Method Details
#days ⇒ Object
40 41 42 |
# File 'lib/periods/modules/yearly_period.rb', line 40 def days (self.next.start_date - start_date).to_i end |
#next ⇒ Object
25.06.2015 => 25.06.2016
29 30 31 |
# File 'lib/periods/modules/yearly_period.rb', line 29 def next self.class.for(start_date.next_year) end |
#previous ⇒ Object
25.06.2015 => 25.06.2014
36 37 38 |
# File 'lib/periods/modules/yearly_period.rb', line 36 def previous self.class.for(start_date.prev_year) end |