* On 05 Jan 2011, Toby Cubitt wrote: > > If I remember correctly, the date_conditional patch doesn't *quite* let > you have a different date/time string for today, rather it gives you a > different date/time string for the last 24h.
The best documentation I've seen is the changelog entry that I wrote for my mercurial patch queue: Allows you to construct format expressions based on relative dates. This adds conditionality features to mutt's date-formatting operators, so that you can build conditions based on whether the date in question is less than or grater than some amount in the past. Example: %?[1y?less than one year&greater than one year? Example: %?[3d?less than three days&greater than three days? This is particularly useful in concert with nested_if. For example, this expression: %<[1y?%<[1w?%<[1d?%[ %H:%M]&%[%a %d]>&%[%b %d]>&%[%y%m%d]> means to show the YYMMDD date for messages older than one year, the "mon dd" date for messages from one week to one year, the "day dd" date for messages from 1 to 7 days old, and the HH:MM time for messages under one day old. So it can handle a single split point as it stands (less than 24h, greater than 24h). > A while back, I wrote a modified version of the date_conditional patch so > that it could be used to produce different formats for mails from today, > from the current month, from the current year, etc. I haven't gotten > around to making it available online, but if you want a copy I'd be happy > to mail it to you. That's what I want as well, but I do it by using date_conditional in conjunction with the more general nested_if patch. Nested_if, as its name suggests, lets you nest mutt's ternary conditionals arbitrarily deep. -- David Champion * d...@uchicago.edu * IT Services * University of Chicago