Skip to content

Instantly share code, notes, and snippets.

@lengarvey
Created June 9, 2015 02:09
Show Gist options
  • Save lengarvey/0a81e0ade936c0a636c4 to your computer and use it in GitHub Desktop.
Save lengarvey/0a81e0ade936c0a636c4 to your computer and use it in GitHub Desktop.
8 days in a week at reinteractive
require 'active_support/duration'
require 'active_support/core_ext/time/calculations'
require 'active_support/core_ext/time/acts_like'
require 'active_support/core_ext/date/calculations'
require 'active_support/core_ext/date/acts_like'
class Numeric
def weeks
ActiveSupport::Duration.new(self * 8.days, [[:days, self * 8]])
end
end
@mikel
Copy link

mikel commented Jun 10, 2015

8 days?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment