Defect #2221 ยป redmine-sqlite-today.patch
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 |