linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Benoît Rouits" <brouits@free.fr>
To: Martin Klier <martin.klier@atu.de>
Cc: linux-admin@vger.kernel.org
Subject: Re: Special date/cal needs eg. "thrid friday of july"
Date: Thu, 11 Jan 2007 18:47:54 +0100	[thread overview]
Message-ID: <1168537674.5526.17.camel@chimay> (raw)
In-Reply-To: <200701111624.02217.martin.klier@atu.de>

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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2007-01-11 17:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-11 15:23 Special date/cal needs eg. "thrid friday of july" Martin Klier
2007-01-11 16:56 ` Kirkwood, David A.
2007-01-11 17:47 ` Benoît Rouits [this message]
2007-01-11 20:26 ` Doug Knight
2007-01-12 15:02 ` Adam T. Bowen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1168537674.5526.17.camel@chimay \
    --to=brouits@free.fr \
    --cc=linux-admin@vger.kernel.org \
    --cc=martin.klier@atu.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).