Consolidate time periods methods into base measure (#30757)
This commit is contained in:
@@ -86,11 +86,11 @@ class Admin::Metrics::Measure::BaseMeasure
|
||||
end
|
||||
|
||||
def time_period
|
||||
(@start_at..@end_at)
|
||||
(@start_at.to_date..@end_at.to_date)
|
||||
end
|
||||
|
||||
def previous_time_period
|
||||
((@start_at - length_of_period)..(@end_at - length_of_period))
|
||||
((@start_at.to_date - length_of_period)..(@end_at.to_date - length_of_period))
|
||||
end
|
||||
|
||||
def length_of_period
|
||||
|
||||
Reference in New Issue
Block a user