Sha256: 188a49549b9dd353ea1e0ad030b4acadead77a24675e90a82e6cf08a84b3c69e

Contents?: true

Size: 241 Bytes

Versions: 14

Compression:

Stored size: 241 Bytes

Contents

# frozen_string_literal: true

require "date"

module Refinements
  # Provides additional enhancements to the DateTime primitive.
  module DateTime
    refine ::DateTime.singleton_class do
      def utc = now.new_offset(0)
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
refinements-12.11.0 lib/refinements/date_time.rb
refinements-12.10.0 lib/refinements/date_time.rb
refinements-12.9.0 lib/refinements/date_time.rb
refinements-12.8.0 lib/refinements/date_time.rb
refinements-12.7.1 lib/refinements/date_time.rb
refinements-12.7.0 lib/refinements/date_time.rb
refinements-12.6.0 lib/refinements/date_time.rb
refinements-12.5.0 lib/refinements/date_time.rb
refinements-12.4.0 lib/refinements/date_time.rb
refinements-12.3.0 lib/refinements/date_time.rb
refinements-12.2.0 lib/refinements/date_time.rb
refinements-12.1.0 lib/refinements/date_time.rb
refinements-12.0.1 lib/refinements/date_time.rb
refinements-12.0.0 lib/refinements/date_time.rb