0
0
Fork 0

Consolidate time periods methods into base measure (#30757)

This commit is contained in:
Matt Jankowski 2024-06-19 04:45:47 -04:00 committed by GitHub
parent 80743e0e7f
commit a8b3d2e4e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 2 additions and 82 deletions

View file

@ -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