[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

date --date='2001-10-01 last friday' etc

From: Michael Wang
Subject: date --date='2001-10-01 last friday' etc
Date: Mon, 8 Oct 2001 17:30:06 -0400
User-agent: Mutt/1.2.5i

>From "info date"
     A few numbers may be written out in words in most contexts.  This is
  most useful for specifying day of the week items or relative items (see
  below).  Here is the list: `first' for 1, `next' for 2, `third' for 3,
  `fourth' for 4, `fifth' for 5, `sixth' for 6, `seventh' for 7, `eighth'
  for 8, `ninth' for 9, `tenth' for 10, `eleventh' for 11 and `twelfth'
  for 12.  Also, `last' means exactly -1.

$ date --date='last Friday'   
Fri Oct  5 00:00:00 EDT 2001

$ date --date='-1 friday'   
date: invalid date `-1 friday'

So it looks like the documentation does not match the behavior.
Besides "last", there is no way to move day of week backward.
Please make an enhancement.

"1 day ago" can be applied to an alternative date, example:
$ date --date='2001-10-01 -1 day'

There is no way that I can find to do
$ date --date='2001-10-01 last Friday'

If there is, please let me know. Otherwise please make an enhancement.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]