For When You Can't Have The Real Thing
[ start | index | login ]
start > mutt > Search By Date

Search By Date

Created by dave. Last edited by dave, 17 years and 229 days ago. Viewed 10,570 times. #1
[edit] [rdf]
labels
attachments

Searching by Date

Mutt supports two types of dates, absolute and relative.

Absolute. 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 specify ``DD/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.

Error Margins. You can add error margins to absolute dates. An error margin is a sign (+ or -), followed by a digit, followed by one of the following units:

  • y years
  • m months
  • w weeks
  • d days
As a special case, you can replace the sign by a ``*'' character, which is equivalent to giving identical plus and minus error margins.

Example: To select any messages two weeks around January 15, 2001, you'd use the following pattern:

  • Limit to messages matching: ~d 15/1/2001*2w
Relative. This type of date is relative to the current date, and may be specified as:
  • >offset (messages older than offset units)
  • <offset (messages newer than offset units)
  • =offset (messages exactly offset units old)
offset is specified as a positive number with one of the following units:
  • y years
  • m months
  • w weeks
  • d days
Example: to select messages less than 1 month old, you would use
  • Limit to messages matching: ~d <1m
Note: all dates used when searching are relative to the local time zone, so unless you change the setting of your $index_format to include a %[...] format, these are not the dates shown in the main index.
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt