-
-
Notifications
You must be signed in to change notification settings - Fork 825
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Genericise 'ending' date filter and add tests
Currently we have hard coded variants of 'ending_2.year' for 'Last 2 years including today' and for month, week and quarter we support last month ending today etc. This adds tests for the units already existing and also adds support (but no UI entries) for ending_n.month ending_n.week ending_n.year ending_n.day ending_n.quarter There is a complexity in that the current month entries are ending_2.month = 'Last 60 days ending today' ending.quarter = 'Last 90 days ending today' I think it was done this way primarily to get the language right but as the period gets longer (my interest is in supporting 18 months) the mismatch between 30 days & a month becomes more & more of an issue. I haven't focussed on any code rationalisation as I wanted to keep this to additional code not changes to current & discuss / agree if this approach (ie. for the 'n' entries we are respectful of actual month lengths & we leave it to future option value enterers to worry about the wording. I actually feel a pretty good case could be made for replacing the default entries so instead of ending_2.month = Last 60 days including today we have ending_60.day = Last 60 days including today (This makes that change on new installs only)
- Loading branch information
1 parent
bdf6f90
commit ad336d6
Showing
3 changed files
with
94 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters