/bin/date --date='next month' is wrong
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
coreutils (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
cat i
/bin/date
/bin/date +'%B'
/bin/date --date='last month' +'%B'
/bin/date --date='this month' +'%B'
/bin/date --date='next month' +'%B'
sh iSun Jan 30 16:59:31 EST 2011
January
December
January
March
Note that 'this month' == January and 'next month' == March
Looks like a bug to me ;)
Mike Bianchi
More info ...
uname -a
Linux foveal4 2.6.24-28-generic #1 SMP Wed Nov 24 09:30:14 UTC 2010 i686 GNU/Linux
date --version
date (GNU coreutils) 6.10
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
env
MANPATH=
CVSROOT=
XDG_SESSION_
BROWSER=mozilla
LD_LIBRARY_
XDM_MANAGED=
HOME=/home/mbianchi
DISPLAY=:0.0
MAILCHECK=0
SSH_AUTH_
PWD=/usr/
PRINTER=ps
METAMAIL_PAGER=less -r -isX
WINDOWID=41943047
CVS_RSH=ssh
PS2=
SHLVL=0
DM_CONTROL=
RUBYLIB=
GS_LIB=
Changed in launchpad: | |
status: | New → Invalid |
affects: | launchpad → null |
no longer affects: | null |
It does seem counterintuitive, but this behavior appears to be by-design. See here for a similar issue: bugs.debian. org/cgi- bin/bugreport. cgi?bug= 301972
http://
Feb. 30th is an invalid date which `date` doesn't want to return, which is why it's bumping the result into March.