[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to calculate date relative to another date?
From: |
Bernhard Voelker |
Subject: |
Re: How to calculate date relative to another date? |
Date: |
Thu, 23 May 2019 08:15:57 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 5/22/19 12:44 PM, Steeve McCauley wrote:
> It would be pretty awesome if one could specify "4 years 11 months 3 days 4
> hours and 7 minutes ago" but that seems not possible.
Every piece of the adjustment can be positive or negative, so you have to
specify "ago" if you mean ago (unlike in natural language):
$ date; date --date='4 years ago 11 months ago 3 days ago 4 hours ago 7
minutes ago'
Thu May 23 08:15:14 CEST 2019
Fri Jun 20 04:08:14 CEST 2014
Have a nice day,
Berny
Re: How to calculate date relative to another date?, Egmont Koblinger, 2019/05/23