Fixed postgresql ERROR: date/time field value out of range: "2016-6-31" issue.
This commit is contained in:
parent
94148b37aa
commit
2137250bae
2 changed files with 6 additions and 5 deletions
|
@ -160,7 +160,8 @@ class ReportsController < ApplicationController
|
||||||
range = 'day'
|
range = 'day'
|
||||||
else
|
else
|
||||||
start = "#{params[:year]}-01-01"
|
start = "#{params[:year]}-01-01"
|
||||||
stop = "#{params[:year]}-12-31"
|
stop_date = Date.parse(day_start).end_of_month
|
||||||
|
stop = "#{stop_date.year}-#{stop_date.month}-#{stop_date.day}"
|
||||||
range = 'month'
|
range = 'month'
|
||||||
end
|
end
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue