[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] %(timenow) -- does it have a purpose?
From: |
Ken Hornstein |
Subject: |
Re: [Nmh-workers] %(timenow) -- does it have a purpose? |
Date: |
Fri, 30 Jun 2017 00:29:57 -0400 |
>Does %(timenow) have a purpose?
Yeah, although probably not what you're thinking of.
The idea is that you could use that in calculations against a date header.
(e.g., %(timenow) - %(clock) would give you an offset, although there is
%(rclock that does that for you).
Things like %(month) are designed to parse a date header, since that's
hard to do from the shell. I could see the value of maybe doing
something to break out a inside of mh-format, but ... what would that
look like? Maybe take a strftime() format string? Might need some thought.
Not sure we could use existing functions since they really want a component.
>Separately, does anyone have a suggestion for generating the
>current date in a reply?
Sure. Have a wrapper script shove it into an enviroment variable and use
%(getenv).
--Ken