[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26101: Counterproductive calculation order in date
From: |
Ulf Zibis |
Subject: |
bug#26101: Counterproductive calculation order in date |
Date: |
Thu, 16 Mar 2017 00:27:50 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
Am 15.03.2017 um 16:53 schrieb Pádraig Brady:
"coreutils FAQ"
By the way, I think there is a typo:
$ date --date="$(date +%Y-%m-15) -1 month" +'Last month was %B.'
Last month was June.
$ date --date="$(date +%Y-%m-15) +1 month" +'Next month will be %B.'
Next month will be May.
Compared with:
$ thismonth=$(date --date="@$now" "+%Y-%m-15 12:00")
$ echo "LastMonth=$(date -d "$thismonth 1 month ago" +%B), NextMonth=$(date -d
"$thismonth 1 month" +%B)."
LastMonth=March, NextMonth=May.
I assume, in the first example, it should be:
Last month was *March*.
-Ulf
smime.p7s
Description: S/MIME Cryptographic Signature
- bug#26101: Counterproductive calculation order in date, (continued)
- bug#26101: Counterproductive calculation order in date, Ulf Zibis, 2017/03/15
- bug#26101: Counterproductive calculation order in date, Eric Blake, 2017/03/15
- bug#26101: Counterproductive calculation order in date, Ulf Zibis, 2017/03/15
- bug#26101: Counterproductive calculation order in date, Assaf Gordon, 2017/03/15
- bug#26101: Counterproductive calculation order in date, Assaf Gordon, 2017/03/15
- bug#26101: Counterproductive calculation order in date, Ulf Zibis, 2017/03/15
- bug#26101: Counterproductive calculation order in date, Eric Blake, 2017/03/15
- bug#26101: Counterproductive calculation order in date, Ulf Zibis, 2017/03/15
- bug#26101: Counterproductive calculation order in date, Pádraig Brady, 2017/03/15
- bug#26101: Counterproductive calculation order in date, Assaf Gordon, 2017/03/15
- bug#26101: Counterproductive calculation order in date,
Ulf Zibis <=