Certain actions (such as “Rename” and “Sort into subfolder”) require patterns, and those patterns in turn can use any of numerous attributes—including several that are based on dates (“date added,” “date created,” “date modified,” “date opened,” and “current date”). You can edit any of these date attributes to express the date using any format you like. So, if the date is the last day of the year 1999, you can create a date pattern that represents that date as “1999-12-31,” “Dec 31 ’99,” “Day 365 of the year A.D. 1999,” or pretty much any other format you like.
To edit a date pattern, first put a date-based token (such as “date added”) in a pattern for an action. Then click the arrow on the right side of the token and choose “Edit Date Pattern” from the pop-up menu. You’ll see a popover like this one:
As in Hazel’s other popovers for creating patterns, you can type in static text or click date tokens to add them to your pattern; Hazel substitutes the real values for those tokens when the rule runs. For more information on editing patterns, see Using Patterns in Actions .
Be aware of the following about date patterns:
-
The date pattern need not contain every token to constitute a full date. You can specify just the year and month or just the hour, if you choose.
-
If you hover your pointer over a date token after adding it to the field, a small arrow appears on its right side. As with other tokens, the arrow indicates that you can click it to display a pop-up menu with formatting options. For example, if you drag in a “Month” token, you’ll see options “1” (the month number without a leading zero), “01” (the month number with a leading zero added if necessary), “Jan” (a shortened version of the month name), and “January” (the full month name).
-
An underline indicates the minimum number of digits. For example, you can choose 1 or 01 for day or month, or 99 or 1999 for year. For days or months with only one digit, Hazel adds a leading zero when you choose 01; for years, Hazel includes all four digits with 1999 but only the last two with 99.
When you’re finished editing, click “Done.”
SEE ALSO