instance method
weeks
Ruby on Rails 8.1.2
Since v3.0.20Signature
weeks()
Returns a Duration instance matching the number of weeks provided.
2.weeks # => 2 weeks
Source
# File activesupport/lib/active_support/core_ext/numeric/time.rb, line 45
def weeks
ActiveSupport::Duration.weeks(self)
end
Defined in activesupport/lib/active_support/core_ext/numeric/time.rb line 45
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Numeric