nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] %(timenow) -- does it have a purpose?

2017-06-29 23:30:34
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

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>