class ActivePeriod::Month
Public Instance Methods
i18n() { |from, to| ... }
click to toggle source
# File lib/active_period/month.rb, line 27 def i18n(&block) return yield(from, to) if block.present? I18n.t(:default_format, scope: i18n_scope, month: I18n.l(from, format: '%B').capitalize, year: from.year) end
strftime(format)
click to toggle source
# File lib/active_period/month.rb, line 19 def strftime(format) from.strftime(format) end
to_s(format: '%m/%Y')
click to toggle source
# File lib/active_period/month.rb, line 23 def to_s(format: '%m/%Y') strftime(format) end