[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Relative Date Queries
From: |
Chad Walstrom |
Subject: |
Re: Relative Date Queries |
Date: |
Mon, 14 Nov 2005 18:10:58 -0600 |
"Edward E. Jaffe" <address@hidden> wrote:
> Is there any way to establish a date query relative to the current
> date? I understand I can query with an expression that includes an
> explicit date, but such queries make little sense when saved.
The short answer is, "No." I think the only way to do this is either
through scripting at the commandline or by custom perl routines in
gnatsweb. That would be a very nice feature, being able to use
relative or descriptive dates in a manner similar to at(1). Perhaps
you could report it as a feature request to
address@hidden or use
http://gnats.wookimus.net/cgi-bin/gnatsweb.pl.
> For example, I might wish to see every PR that arrived today. If I
> construct a query using today's date and save it (using the Gnatsweb
> "cookie" feature), I can't use the same query tomorrow to show me
> the PRs that arrived that day. Instead, I have to construct a new
> query each day.
>
> I'd like to be able to specify a date like -5 -- meaning five days
> prior to today (-0 would mean today).
The equivalent line in at(1) would be: "at now - COUNT TIME_UNITS" or
"at now - 5 days". In addition to the "now" alias, there are
"yesterday", "tomorrow", and "midnight", "noon", and even "teatime".
Time units can be "minutes", "hours", "days", or "weeks". To
translate that into query-pr syntax:
$ query-pr --expr 'Arrival-Date="today"'
or
$ query-pr --expr 'Arrival-Date<"now - 3 hours"
Anyone willing to code that up? ;-) We may be able to borrow some GPL
code in an existing project to do it.
--
Chad Walstrom <address@hidden> http://www.wookimus.net/
assert(expired(knowledge)); /* core dump */
- Re: Relative Date Queries,
Chad Walstrom <=