Sha256: 4be250a047466ecc34fe86914b74a295dc3ba6be84b52cd8a92382ccf740dc37

Contents?: true

Size: 206 Bytes

Versions: 45

Compression:

Stored size: 206 Bytes

Contents

class Date
  def to_json(*a)
    %("#{as_json}")
  end
  
  def as_json(*args)
    strftime("%Y/%m/%d")
  end
  
  def self.json_create string
    return nil if string.nil?
    Date.parse(string)
  end
end

Version data entries

45 entries across 45 versions & 3 rubygems

Version Path
couch_potato-1.18.0 lib/core_ext/date.rb
couch_potato-1.17.0 lib/core_ext/date.rb
couch_potato-1.16.0 lib/core_ext/date.rb
couch_potato-1.15.0 lib/core_ext/date.rb
couch_potato-1.14.0 lib/core_ext/date.rb
couch_potato-1.13.0 lib/core_ext/date.rb
couch_potato-1.12.1 lib/core_ext/date.rb
couch_potato-1.12.0 lib/core_ext/date.rb
couch_potato-1.11.0 lib/core_ext/date.rb
couch_potato-1.10.1 lib/core_ext/date.rb
couch_potato-1.10.0 lib/core_ext/date.rb
couch_potato-1.9.0 lib/core_ext/date.rb
couch_potato-1.7.1 lib/core_ext/date.rb
couch_potato-1.7.0 lib/core_ext/date.rb
couch_potato-1.6.5 lib/core_ext/date.rb
couch_potato-1.6.4 lib/core_ext/date.rb
couch_potato-1.6.3 lib/core_ext/date.rb
couch_potato-1.4.0 lib/core_ext/date.rb
couch_potato-1.3.0 lib/core_ext/date.rb
couch_potato-1.2.0 lib/core_ext/date.rb