Discussion:
[bug-mailutils] Only one date format
積丹尼 Dan Jacobson
2018-01-18 10:31:05 UTC
Permalink
(info "(mailutils) Mail Variables")
says

'headline'
Letter Meaning
--------------------------------------------------------------------------
%d The date when the message was received.

Gee only one date format!

Please also provide additional granularity like
(info "(coreutils) Time conversion specifiers")
(info "(coreutils) Date conversion specifiers")
Thanks!
Sergey Poznyakoff
2018-01-18 17:21:10 UTC
Permalink
Post by 積丹尼 Dan Jacobson
Please also provide additional granularity like
(info "(coreutils) Time conversion specifiers")
(info "(coreutils) Date conversion specifiers")
Thanks for the suggestion.

Regards,
Sergey
Neil R. Ormos
2018-01-18 19:53:06 UTC
Permalink
Post by Sergey Poznyakoff
Post by 積丹尼 Dan Jacobson
Please also provide additional granularity like
(info "(coreutils) Time conversion specifiers")
(info "(coreutils) Date conversion specifiers")
Thanks for the suggestion.
I agree with the substance of this feature
request.

It would be helpful if the user could define the
appearance of the date/time field using any
combination of the format specifiers supported by
strftime(3).

The find(1) utility -printf action has a syntax
that might be an example of how to address
collisions of the existing format codes and those
of strftime (though it requires much error-prone
typing).

Also, the Pine and Alpine MUAs include "smart"
dates and times that might be helpful to some
users. See, e.g., SMARTTIME in:

http://www.washington.edu/alpine/tech-notes/config.html

Best regards,

--Neil Ormos
Sergey Poznyakoff
2018-01-19 12:59:26 UTC
Permalink
I have pushed 5a7b63b213, which implements the new %D specifier.

The new specifier allows you to supply arbitrary strftime(3) format
string for outputting message date/time. E.g.:

set headline="%4m %20D{%Y-%m-%dT%H:%M:%S} %18f %s"

In simplified form, %D can be followed by a single time format
specifier. E.g. %DH can be used instead of %D{%H}.

See the doc for details.

Regards,
Sergey
Neil R. Ormos
2018-01-23 22:09:33 UTC
Permalink
Post by Sergey Poznyakoff
I have pushed 5a7b63b213, which implements the new %D specifier.
The new specifier allows you to supply arbitrary strftime(3) format
set headline="%4m %20D{%Y-%m-%dT%H:%M:%S} %18f %s"
In simplified form, %D can be followed by a single time format
specifier. E.g. %DH can be used instead of %D{%H}.
See the doc for details.
Thank you. The feature works nicely in my (superficial)
testing.

Best regards,

--Neil Ormos

Loading...