Sha256: d5247f3adfb295a525a2f1f607e3512d5b068b1754d111972048bac7098c9b83

Contents?: true

Size: 316 Bytes

Versions: 25

Compression:

Stored size: 316 Bytes

Contents

class Date
  # Returns a JSON string representing the date.
  #
  # ==== Example:
  #   Date.new(2005,2,1).to_json
  #   # => "2005/02/01"
  def to_json(options = nil)
    if ActiveSupport.use_standard_json_time_format
      %("#{strftime("%Y-%m-%d")}")
    else
      %("#{strftime("%Y/%m/%d")}")
    end
  end
end

Version data entries

25 entries across 25 versions & 7 rubygems

Version Path
3mix-castronaut-0.5.0.2 vendor/activesupport/lib/active_support/json/encoders/date.rb
masover-castronaut-0.4.4.4 vendor/activesupport/lib/active_support/json/encoders/date.rb
masover-castronaut-0.4.4.5 vendor/activesupport/lib/active_support/json/encoders/date.rb
masover-castronaut-0.5.0.1 vendor/activesupport/lib/active_support/json/encoders/date.rb
relevance-castronaut-0.4.1 vendor/activesupport/lib/active_support/json/encoders/date.rb
relevance-castronaut-0.4.2 vendor/activesupport/lib/active_support/json/encoders/date.rb
relevance-castronaut-0.4.3 vendor/activesupport/lib/active_support/json/encoders/date.rb
relevance-castronaut-0.4.4 vendor/activesupport/lib/active_support/json/encoders/date.rb
relevance-castronaut-0.4.5 vendor/activesupport/lib/active_support/json/encoders/date.rb
relevance-castronaut-0.4.6 vendor/activesupport/lib/active_support/json/encoders/date.rb
relevance-castronaut-0.5.0 vendor/activesupport/lib/active_support/json/encoders/date.rb
relevance-castronaut-0.5.1 vendor/activesupport/lib/active_support/json/encoders/date.rb
relevance-castronaut-0.5.2 vendor/activesupport/lib/active_support/json/encoders/date.rb
relevance-castronaut-0.5.3 vendor/activesupport/lib/active_support/json/encoders/date.rb
relevance-castronaut-0.5.4 vendor/activesupport/lib/active_support/json/encoders/date.rb
radiant-0.7.2 vendor/rails/activesupport/lib/active_support/json/encoders/date.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/activesupport/lib/active_support/json/encoders/date.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/activesupport/lib/active_support/json/encoders/date.rb
activesupport-2.1.2 lib/active_support/json/encoders/date.rb
activesupport-2.1.1 lib/active_support/json/encoders/date.rb