On Fri, Jan 07, 2011 at 05:29:32AM -0600, David Champion wrote:
Aha, finally I have discovered a use for mutt's % expando.
You can optimize this one step further.
set index_format="./format_date.sh '%[%Y%m%d]' '%<%Y%m%d>' |"
#!/bin/sh
if [ $1 -eq $2 ]; then
echo "%4C %Z %{ %
On Fri, Jan 07, 2011 at 05:07 -0600, David Champion wrote:
> * On 07 Jan 2011, Yue Wu wrote:
> > On Fri, Jan 07, 2011 at 03:40:12PM +0800, du yang wrote:
> > >
> > > if [ $(date -d "$(date '+%Y-%m-%d')" "+%s") -gt $epoch ]; then
> > > echo "%4C %Z %{%d.%m.%y} %-15.15F (%?l?%4l&%4c?) %?H?[%H]?%
On Fri, Jan 07, 2011 at 18:21 +0800, Yue Wu wrote:
> On Fri, Jan 07, 2011 at 03:40:12PM +0800, du yang wrote:
> > Hi,
> >
> > I improved the script to fulfill the author's the expectation(just display
> > time for today's mails),
> > only 'if condition' changed.
> >
> > - du yang
> >
> > ==
On Fri, Jan 07, 2011 at 05:29 -0600, David Champion wrote:
> * On 07 Jan 2011, du yang wrote:
> > Hi,
> >
> > I improved the script to fulfill the author's the expectation(just display
> > time for today's mails),
> > only 'if condition' changed.
> > ...
> > if [ $(date -d "$(date '+%Y-%m-%d')"
* On 07 Jan 2011, du yang wrote:
> Hi,
>
> I improved the script to fulfill the author's the expectation(just display
> time for today's mails),
> only 'if condition' changed.
> ...
> if [ $(date -d "$(date '+%Y-%m-%d')" "+%s") -gt $epoch ]; then
> echo "%4C %Z %{%d.%m.%y} %-15.15F (%?l?%4l
On Fri, Jan 07, 2011 at 05:07:47AM -0600, David Champion wrote:
> * On 07 Jan 2011, Yue Wu wrote:
> > On Fri, Jan 07, 2011 at 03:40:12PM +0800, du yang wrote:
> > >
> > > if [ $(date -d "$(date '+%Y-%m-%d')" "+%s") -gt $epoch ]; then
> > > echo "%4C %Z %{%d.%m.%y} %-15.15F (%?l?%4l&%4c?) %?H?[
On Fri, Jan 07, 2011 at 18:54 +0800, Yue Wu wrote:
> On Fri, Jan 07, 2011 at 06:32:44PM +0800, du yang wrote:
> >
> > Change '#!/bin/bash' to '#!/bin/sh' in the script header, then it may work.
> >
> > else please post the error details.
> >
>
> I've tried it, but many messages like:
>
> u
* On 07 Jan 2011, Yue Wu wrote:
> On Fri, Jan 07, 2011 at 03:40:12PM +0800, du yang wrote:
> >
> > if [ $(date -d "$(date '+%Y-%m-%d')" "+%s") -gt $epoch ]; then
> > echo "%4C %Z %{%d.%m.%y} %-15.15F (%?l?%4l&%4c?) %?H?[%H]?%s%"
> > else
> > echo "%4C %Z %{ %H:%M} %-15.15F (%?l?%4l&%4c?
On Fri, Jan 07, 2011 at 06:32:44PM +0800, du yang wrote:
>
> Change '#!/bin/bash' to '#!/bin/sh' in the script header, then it may work.
>
> else please post the error details.
>
I've tried it, but many messages like:
usage: date [-jnu] [-d dst] [-r seconds] [-t west]
[-v[+|-]val[ymwdH
On Fri, Jan 07, 2011 at 18:21 +0800, Yue Wu wrote:
> On Fri, Jan 07, 2011 at 03:40:12PM +0800, du yang wrote:
> > Hi,
> >
> > I improved the script to fulfill the author's the expectation(just display
> > time for today's mails),
> > only 'if condition' changed.
> >
> > - du yang
> >
> > ==
On Fri, Jan 07, 2011 at 03:40:12PM +0800, du yang wrote:
> Hi,
>
> I improved the script to fulfill the author's the expectation(just display
> time for today's mails),
> only 'if condition' changed.
>
> - du yang
>
>
> #!/bin/bash
>
> epoch="$1"
>
> if [ $(date -
On Wed, Jan 05, 2011 at 04:32:44PM -0600, David Champion wrote:
> * On 05 Jan 2011, Yue Wu wrote:
> > Hi list,
> >
> > Is there a date/time string that show the time only for today's emails
> > but date for else? So, in the index, the emails that got today will
> > show the time only, but the one
Hi,
I improved the script to fulfill the author's the expectation(just display time
for today's mails),
only 'if condition' changed.
- du yang
#!/bin/bash
epoch="$1"
if [ $(date -d "$(date '+%Y-%m-%d')" "+%s") -gt $epoch ]; then
echo "%4C %Z %{%d.%m.%y} %-15.
On Thu, Jan 06, 2011 at 03:09:53AM +, Toby Cubitt wrote:
> As far as I recall (it's a long time since I looked at it), the
> date_conditional patch straightforwardly compares the email date stamp
> against the current time. The <1d conditional is true whenever the email
> is dated less than 24h
* On 05 Jan 2011, Toby Cubitt wrote:
>
> is dated less than 24h before the current time. That's *not* what I'm
> after. When the current time is 00:01 on the 6 Jan, I want an email that
> arrived at 23:59 on the 5 Jan to display "Sun 05", even though the email
> is only two minutes old.
I unders
On Wed, Jan 05, 2011 at 07:22:18PM -0600, David Champion wrote:
> * On 05 Jan 2011, Toby Cubitt wrote:
> >
> > Yes, but how would you use this to e.g. print only the time for all
> > emails received today, but print the date for all emails received
> > yesterday or earlier? A split point of 24h i
* On 05 Jan 2011, Toby Cubitt wrote:
>
> Yes, but how would you use this to e.g. print only the time for all
> emails received today, but print the date for all emails received
> yesterday or earlier? A split point of 24h is no use. If it's currently
That's what nested_if is for. Here is the da
On Wed, Jan 05, 2011 at 05:20:19PM -0600, David Champion wrote:
> * 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
Hi,
* Yue Wu schrieb am Donnerstag, den 06. Januar 2011:
> Is there a date/time string that show the time only for today's emails
> but date for else? So, in the index, the emails that got today will
> show the time only, but the ones that got on other days will show the
> date and time.
I use t
* 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
On Wed, Jan 05, 2011 at 04:32:44PM -0600, David Champion wrote:
> * On 05 Jan 2011, Yue Wu wrote:
> > Hi list,
> >
> > Is there a date/time string that show the time only for today's emails
> > but date for else? So, in the index, the emails that got today will
> > show the time only, but the one
* On 05 Jan 2011, Yue Wu wrote:
> Hi list,
>
> Is there a date/time string that show the time only for today's emails
> but date for else? So, in the index, the emails that got today will
> show the time only, but the ones that got on other days will show the
> date and time.
Not in out-of-box m
Hi list,
Is there a date/time string that show the time only for today's emails
but date for else? So, in the index, the emails that got today will
show the time only, but the ones that got on other days will show the
date and time.
--
Regards,
Yue Wu
Key Laboratory of Modern Chinese Medicines
23 matches
Mail list logo