[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] extending getdate.y by calling it differently?
From: |
James Youngman |
Subject: |
[Bug-gnulib] extending getdate.y by calling it differently? |
Date: |
Mon, 1 Nov 2004 00:09:26 +0000 |
User-agent: |
Mutt/1.3.28i |
Hello,
I'm looking at an idea of supporting absolute date range specification
in findutils which are analogous with the relative times supported by
tests like -atime.
One way to make this work would be to have a rigidly-defined grammar
for how those timestamps are represented. However, that feels a lot
like reinventing a wheel. An alternative would be to make use of
getdate like this:
find / -modifiedafter "tomorrow 11:32"
find . -modifiedbetween "January 12 1985 and two hours ago"
In the second example above I would hope to be able to parse two dates
separated by "and". To make this possible the ideal thing would be if
get_date() had a variant which would return the number of characters
of the input string consumed, in a way perhaps similar to strtoul().
Is this practical, or will it be very hard to get get_date() to do
anything other than consume all its input?
Regards,
James.