date command "-d last month" error

Randall Nelson <[email protected]>
Newsgroups gmane.comp.gnu.sh-utils.bugs
Organization Next Paradigm Systems, Inc.
Message-ID <[email protected]>
Hello,

I have just found a bug in the date command.

on 3/29/02 at 10 PM CST  date -d 'last month' +%Y%m  returned 200203

Should be 200202

on 3/28/02 at 10 PM CST  date -d 'last month' +%Y%m  returned 200202

As it should.

Could this be due to Feb. having 28 days?

Randy
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.