Project

General

Profile

Defect #2221 ยป redmine-sqlite-today.patch

Today patch for sqlite - Alex Mankuta, 2008-11-21 12:04

View differences:

app/models/query.rb (working copy)
341 341
      when "t+"
342 342
        sql = sql + "#{db_table}.#{db_field} BETWEEN '%s' AND '%s'" % [connection.quoted_date((Date.today + v.first.to_i).to_time), connection.quoted_date((Date.today + v.first.to_i + 1).to_time)]
343 343
      when "t"
344
        sql = sql + "#{db_table}.#{db_field} BETWEEN '%s' AND '%s'" % [connection.quoted_date(Date.today.to_time), connection.quoted_date((Date.today+1).to_time)]
344
        sql = sql + "#{db_table}.#{db_field} BETWEEN '%s' AND '%s'" % [connection.quoted_date((Date.today-1).to_time.end_of_day), connection.quoted_date(Date.today.to_time.end_of_day)]
345 345
      when "w"
346 346
        from = l(:general_first_day_of_week) == '7' ?
347 347
          # week starts on sunday
    (1-1/1)