Re: Special date/cal needs eg. "thrid friday of july"

Benoît Rouits <[email protected]>
Newsgroups org.kernel.vger.linux-admin
Message-ID <1168537674.5526.17.camel@chimay>
Hi

An example relative to this week:
ben@chimay:~ $ date -d "tuesday + 34 weeks"
[will give the next tuesday 34 weeks in the future]

An example relative to now
ben@chimay:~ $ date -d "now + 35 seconds - 3 days + 1 year"
[will give a dummy date in year 2008, based on "now" and some + and - ]

Other example
ben@chimay:~ $ date -d "3 days ago"
[no comment]

An absolute date:
ben@chimay:~ $ date -d "2007 1 jan"

could not find out how to mix absolute dates and '+' and '-'
HTH

Le jeudi 11 janvier 2007 à 16:23 +0100, Martin Klier a écrit :
> Hi Linux Admins,
> 
> is there a command to get something like "thrid friday of july" or "second 
> wednesday each month"? I crossread the manuals for date and gcal, but it 
> seems to be impossible. Next thing I found was gcal, with 
> "--period-of-fixed-dates", but I have not been able to get useful results, 
> and 
> date -d "35 tuesday" (35th tuesday of a year), but I have not been able to 
> limit it to months nor selecting the year (by the way, I do not need it).
> 
> Has somebody experience with this one, and can you give me a hint where to 
> look, or even an example?
> 
> Thanks a lot in advance,

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.