Method: ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting#quoted_date
- Defined in:
- activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb
#quoted_date(value) ⇒ Object
Quote date/time values for use in SQL input.
143 144 145 146 147 148 149 150 |
# File 'activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb', line 143 def quoted_date(value) # :nodoc: if value.year <= 0 bce_year = format("%04d", -value.year + 1) super.sub(/^-?\d+/, bce_year) + " BC" else super end end |