Sha256: 9861321f117fd1fda8b79c8343e6be1d176cf26653fd8fb6bfa20e7dee20b0f1

Contents?: true

Size: 361 Bytes

Versions: 5

Compression:

Stored size: 361 Bytes

Contents

# frozen_string_literal: true

#
# @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

5 entries across 5 versions & 2 rubygems

Version Path
brcobranca_sicredi_400-1.0 lib/brcobranca/util/date.rb
brcobranca-11.1.0 lib/brcobranca/util/date.rb
brcobranca-11.0.0 lib/brcobranca/util/date.rb
brcobranca-10.1.0 lib/brcobranca/util/date.rb
brcobranca-10.0.0 lib/brcobranca/util/date.rb