Class: Montrose::Frequency::Monthly

Inherits:
Montrose::Frequency show all
Defined in:
lib/montrose/frequency/monthly.rb

Constant Summary

Constants inherited from Montrose::Frequency

FREQUENCY_KEYS, FREQUENCY_TERMS

Instance Attribute Summary

Attributes inherited from Montrose::Frequency

#starts, #time

Instance Method Summary collapse

Methods inherited from Montrose::Frequency

assert, from_options, #initialize, #matches_interval?

Methods included from Rule

#advance!, #continue?, included

Constructor Details

This class inherits a constructor from Montrose::Frequency

Instance Method Details

#include?(time) ⇒ Boolean

Returns:

  • (Boolean)

5
6
7
# File 'lib/montrose/frequency/monthly.rb', line 5

def include?(time)
  matches_interval?((time.month - @starts.month) + (time.year - @starts.year) * 12)
end