[Remind-Fans] Can remind "count" time?

Larry Hynes larry at larryhynes.com
Wed Feb 19 18:12:52 EST 2020


Dianne Skoll <dianne at skoll.ca> wrote:
> On 2020-02-18 09:36, Sector11 wrote:
> 
> > Bob (will be) 47 in 3m 6d
> > Christmas (in) 5m 16d
> > Debian 11 (in) 3y 5m 18d
> 
> Remind does not have a built-in way to express a duration as X
> years, Y months and Z days.  In general, there's no way to express a
> time interval that way unless you know the duration in days and the
> starting point (or equivalently, the ending point.)

OT, but of possible help to the OP, I think ddiff(1) from
dateutils[0] will do what's required e.g., the command:

	ddiff today 2042-02-29 -f '%yy %ww %dd'

yields the result:

	22y 1w 2d

It would probably be easy enough to get remind to RUN a suitable
script or command, or incorporate it with remind's output in some
way.

$ cat test.rem
REM Feb 19 MSG Test

$ cat test.sh

#!/bin/sh

remind ~/test.rem

echo "Bob will be 47 in $(ddiff today 2042-02-29 -f '%yy %ww %dd')"

$ sh test.sh

Reminders for Wednesday, 19th February, 2020 (today):

Test

Bob will be 47 in 22y 1w 2d

[0]: https://www.fresse.org/dateutils/


More information about the Remind-fans mailing list