Autor: Jakob Hirsch Data: A: Heiko Schlichting CC: exim-users Assumpte: Re: [exim] Opposite of ${time_interval:<string>} ?
Heiko Schlichting wrote:
First, please read the list etiquette before posting again, esp. the
paragraph about thread stealing.
> How can I convert "1d10h17m36s" into 123456 with exim? Although exim does
cumbersome (but with the right regex probably much easier) but feasible:
${eval:\
${if match {1d10h17m36s} {\N(\d+)w\N} {$1*7*24*60*60+}}\
${if match {1d10h17m36s} {\N(\d+)d\N} {$1*24*60*60+}}\
${if match {1d10h17m36s} {\N(\d+)h\N} {$1*60*60+}}\
${if match {1d10h17m36s} {\N(\d+)m\N} {$1*60+}}\
${if match {1d10h17m36s} {\N(\d+)s\N} {$1+}}\
0}
> have a function for this (readconf_readtime), I'm unable to find an
> expansion operator to convert as I demand.
Better to put that into a string expansion function then.