Sha256: fec7a41c70e7bb5f8d09e922ff298d7710f11bd9f77585e030e18558bd1c6139

Contents?: true

Size: 356 Bytes

Versions: 11

Compression:

Stored size: 356 Bytes

Contents

# -*- encoding: utf-8 -*-
#
# @author Eduardo Reboucas
#
# Para manter compatibilidade com ActiveModel

require 'date'
require 'time'

class Date
  def self.current
    Time.respond_to?(:zone) && Time.zone ? Time.zone.today : Date.today
  end
end

class Time
  def self.current
    Time.respond_to?(:zone) && Time.zone ? Time.zone.now : Time.now
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
brcobranca-9.2.4 lib/brcobranca/util/date.rb
brcobranca-9.2.3 lib/brcobranca/util/date.rb
bbrcobranca-0.0.2 lib/bbrcobranca/util/date.rb
bbrcobranca-0.0.1 lib/bbrcobranca/util/date.rb
brcobranca-9.2.2 lib/brcobranca/util/date.rb
brcobranca-9.2.1 lib/brcobranca/util/date.rb
brcobranca-9.2.0 lib/brcobranca/util/date.rb
brcobranca-9.1.2 lib/brcobranca/util/date.rb
brcobranca-9.1.1 lib/brcobranca/util/date.rb
brcobranca-9.1.0 lib/brcobranca/util/date.rb
brcobranca-9.0.0 lib/brcobranca/util/date.rb