2
# Coerces the date to a string for JSON encoding.
4
# ISO 8601 format is used if ActiveSupport::JSON::Encoding.use_standard_json_time_format is set.
8
# # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = true
9
# Date.new(2005,2,1).to_json
12
# # With ActiveSupport::JSON::Encoding.use_standard_json_time_format = false
13
# Date.new(2005,2,1).to_json
15
def as_json(options = nil)
16
if ActiveSupport::JSON::Encoding.use_standard_json_time_format