[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
changes (bugs?) in date --date=
From: |
Gus Michel |
Subject: |
changes (bugs?) in date --date= |
Date: |
Fri, 27 Jan 2006 14:28:01 -0600 |
Up through coreutils 5.2.1, date gave the following output:
gus$ date +'%a %F'
Fri 2006-01-27
gus$ date +'%a %F' --date='sat'
Sat 2006-01-28
gus$ date +'%a %F' --date='-4 days sat'
Sat 2006-01-28
gus$ date +'%a %F' --date='sat -4 days'
Sat 2006-01-28
gus$
In versions beginning with 5.3.0, these same commands yield:
gus$ date +'%a %F'
Fri 2006-01-27
gus$ date +'%a %F' --date='sat'
Sat 2006-01-28
gus$ date +'%a %F' --date='-4 days sat'
Tue 2006-01-24
gus$ date +'%a %F' --date='sat -4 days'
Tue 2006-01-24
gus$
Before this change, the interpretation of both "-4 days sat" and "sat -4 days"
was "saturday, as referenced from four days ago" and now, both are "four days
before saturday", yeilding very different answers. The info documentation is
unchanged as far as I can tell between the two, and the release docs, while
they do mention changes to date, don't touch on this topic. (Besides the
source) is there any documentation to reliably predict what is meant by date
strings which mix [partial] absolute time references and relative ones?
Gus Michel
- changes (bugs?) in date --date=,
Gus Michel <=