Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Search modifier for date

#1717

Hi,

Is there a search modifier for dates?

It's great being able to use the search box for most everything else, but inconvenient to have to resort to the mouse to search for messages by date.

If not already existing, suggest something like 'd' as in Mutt:

6.1 Searching by Date

All dates must be in DD/MM/YY format (month and year are optional, defaulting to the current month and year). An example of a valid range of dates is:

Limit to messages matching: ~d 20/1/95-31/10 If you omit the minimum (first) date, and just specify -DD/MM/YY'', all messages before the given date will be selected. If you omit the maximum (second) date, and specifyDD/MM/YY-'', all messages after the given date will be selected. If you specify a single date with no dash (``-''), only messages sent on the given date will be selected.

Would also be good to have a relative dates work as well (2d / 2m / 2y for 2 days / 2 months / 2 years ago).

Cheers,
Yen

Reported by Tee Yen Ng · March 17th, 2017 @ 01:17 AM

State: new
Milestone: none
Assigned to: benny benny

Activity

  1. benny
    benny
    • State changed from new to accepted

    There's currently no such modifier. Thanks for the inspiration from Mutt.

    The toolbar search field is actually implemented using an external command included with MailMate (which uses Python). This is what needs to be extended with the d syntax. The long term plan is to make it easy/easier for users to replace this with their own search syntax.

    March 24th, 2017 @ 02:30 PM

  2. Muescha
    Muescha

    i miss also the date modifier ...
    pls also the dd.mm.yy and dd.mm.yyyy syntax
    also without day: 01.2017-02.2017
    or only: 01.2017 for january

    June 17th, 2017 @ 04:24 AM

  3. benny
    benny
    • State changed from accepted to fixcommitted

    It took some time, but I have good news on this one. Hold down ⌥ when clicking “Check Now” in MailMate to get the latest test release. Use “View Search Syntax” in the toolbar search field popup to see the syntax available with the new d modifier. It supports relative days, various date separators, both year-first and day-first formats, and more. It doesn't support the Mutt-style ranges, but that could still be added if needed.

    The main issue with the current solution is a general problem where MailMate doesn't take time zones into consideration when searching on/from/to specific dates. (It works for relative dates.)

    Since the syntax is implemented I'll close this ticket, but I've still got a note on the issue with time zones.

    September 7th, 2018 @ 10:43 AM

  4. benny
    benny
    • State changed from fixcommitted to fixreleased

    September 10th, 2018 @ 02:03 PM

  5. Tee Yen Ng
    Tee Yen Ng

    Huzzah! Super convenient :)

    Thanks Benny!

    September 11th, 2018 @ 08:46 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.