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
32 33 34 |
# File 'lib/periods/modules/yearly_period.rb', line 32 def days (self.next.start_date - start_date).to_i end |
#next ⇒ Object
25.06.2015 => 25.06.2016
21 22 23 |
# File 'lib/periods/modules/yearly_period.rb', line 21 def next self.class.for(start_date.next_year) end |
#previous ⇒ Object
25.06.2015 => 25.06.2014
28 29 30 |
# File 'lib/periods/modules/yearly_period.rb', line 28 def previous self.class.for(start_date.prev_year) end |