Defect #2221 ยป redmine-sqlite-today.patch
| app/models/query.rb (working copy) | ||
|---|---|---|
|
when "t+"
|
||
|
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)]
|
||
|
when "t"
|
||
|
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)]
|
||
|
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)]
|
||
|
when "w"
|
||
|
from = l(:general_first_day_of_week) == '7' ?
|
||
|
# week starts on sunday
|
||