diff options
author | Ulrich Müller <ulm@gentoo.org> | 2009-10-08 07:33:57 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2009-10-08 07:33:57 +0000 |
commit | a1e04be35697f6e19cc01235c2d80674c799a77c (patch) | |
tree | 122c5e5169a3ab6affb31dce5827b464c052dbd3 /modules/news.eselect | |
parent | New relative_name() function. (diff) | |
download | eselect-a1e04be35697f6e19cc01235c2d80674c799a77c.tar.gz eselect-a1e04be35697f6e19cc01235c2d80674c799a77c.tar.bz2 eselect-a1e04be35697f6e19cc01235c2d80674c799a77c.zip |
Really remove leading zeros in numeric month.
svn path=/trunk/; revision=684
Diffstat (limited to 'modules/news.eselect')
-rw-r--r-- | modules/news.eselect | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/news.eselect b/modules/news.eselect index 9124425..069c042 100644 --- a/modules/news.eselect +++ b/modules/news.eselect @@ -131,7 +131,7 @@ mail_header() { # "date -d" is not portable, therefore we do manual processing if [[ ${posted} == +([0-9])-+([0-9])-+([0-9]) ]]; then year=${posted%%-*} - month=${posted#*-*(0)}; month=${month%%-*} + month=${posted#*-}; month=${month%%-*} day=${posted##*-} fi wd=$(day_of_week "${year}" "${month}" "${day}") @@ -148,11 +148,11 @@ mail_header() { && name=$(rfc2047_encode "${name}") [[ ${title} != *([[:ascii:]]) ]] && title=$(rfc2047_encode "${title}") - echo "From ${addr} ${wd} ${mname[month]} ${day} ${time} ${year}" + echo "From ${addr} ${wd} ${mname[${month##*(0)}]} ${day} ${time} ${year}" echo "From: ${name}${name+ }<${addr}>" #echo "Reply-To: DO NOT REPLY <devnull@localhost.invalid>" echo "Subject: ${title}" - echo "Date: ${wd}, ${day} ${mname[month]} ${year} ${time} +0000" + echo "Date: ${wd}, ${day} ${mname[${month##*(0)}]} ${year} ${time} +0000" echo "Message-Id: <glep42-${item}@gentoo.org>" echo "MIME-Version: 1.0" echo "Content-Type: text/plain; charset=UTF-8" |