Enh: simplify date range calculations spanning a month
- Dominant language
- JavaScript
- Stars
- 80
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
The date range calculations currently work out the end of the month. This involves leap-year calculations and a table of days in each month.
It would be simpler to express the date range as
gte=YYYY/MM/01 00:00:00
lt=YYYY'/MM'/01 00:00:00
where MM' is MM+1 unless MM=12 etc.
Also, rather than using the string date field, it would likely be more efficient to use the epoch.
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the date range calculation described in the issue and inspect how it currently determines month ends and uses the string date field. Compare the proposed month-boundary and epoch-based approach with existing behavior, then verify that date-range results remain correct, including December and leap years.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100