class ActivePeriod::Year
@author Lucas Billaudot <billau_l@modulotech.fr> @note One of the StandardPeriod
defined in the gem
Public Instance Methods
i18n() { |from, to| ... }
click to toggle source
# File lib/active_period/year.rb, line 25 def i18n(&block) return yield(from, to) if block.present? I18n.t(:default_format, scope: i18n_scope, year: from.year) end
strftime(format)
click to toggle source
# File lib/active_period/year.rb, line 17 def strftime(format) from.strftime(format) end
to_s(format: '%Y')
click to toggle source
# File lib/active_period/year.rb, line 21 def to_s(format: '%Y') strftime(format) end