Opened 17 years ago
Last modified 11 years ago
#10911 closed
Date comparison lookup operators — at Initial Version
| Reported by: | vbmendes | Owned by: | nobody |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | 1.0 |
| Severity: | Normal | Keywords: | lookup, orm, date |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
It would be nice to have lookup operators such as day_gt, day_gte, day_lt, day_lte, month_gt, month_gte, month_lt and month_lte. With this, we will be able to do comparisons such as datemonth_gt=6 to find objects with the date object in the second semester, and much more good things. The lookups are:
- day_lt -- day lower then;
- day_gt -- day greather then;
- day_lte -- day lower then or equal;
- day_gte -- day greather then or equal;
- day_range -- accepts a tuple or list with two elements, just like the range loopup operator;
And the same thing for month, year and week_day.
Note:
See TracTickets
for help on using tickets.