1 Nov 2004 01:09
extending getdate.y by calling it differently?
James Youngman <jay <at> gnu.org>
2004-11-01 00:09:26 GMT
2004-11-01 00:09:26 GMT
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.

RSS Feed