Opened 16 years ago

Last modified 10 years ago

#10911 closed

Date comparison lookup operators — at Version 1

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 (last modified by Alex Gaynor)

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 date__month_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.

Change History (1)

comment:1 by Alex Gaynor, 16 years ago

Description: modified (diff)

Please use preview.

Note: See TracTickets for help on using tickets.
Back to Top