Re: Some questions about file handling + some other things
Ralf Schlatterbeck <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Mar 23, 2021 at 02:25:49AM +0100, Nagy Gabor wrote: > When I do not know how to do something, I always look at working > examples first. (Now I am trying to learn how to use the Date() and > Interval() machinery... Atm I do not really know how can use Date() > "arithmetic" and comparison in the web interface (it is OK in an > extension). I do not even know how to filter tasks with > "deadline <= 2021.03.24", for example. I suspect I have to use > filter_sql.) You can subtract Date objects to yield an Interval. And you can add an Interval to a Date. You also can compare dates (and Intervals). As John has already pointed out the query syntax is described, I prefer the geek syntax, with a ';' as the separator. So searching for a range of dates is done by specifying a range (start or end may be omitted), e.g. '.-5w;.+5w' will search for all dates in the range +/- 5 weeks from now. As you may have noticed, '.' is special and denotes the current date/time. New is that you can combine multiple ranges with ',' as a separator in a query, I'm not sure this is documented fully yet. And '-' is special and matches an empty date (NULL in the database, None in python). So if you have an end-date and you're searching for all items that have either an empty end-date or None you would use ';.,-' as the query string .-) Ralf -- Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16 Open Source Consulting www: www.runtux.com Reichergasse 131, A-3411 Weidling email: [email protected]