Mr_Noodle wrote:So, the year in the document is not a valid year? I'm unclear on how it matches at all if it's some unprintable unicode character. If you are not matching the year in the pattern, then Hazel will use the current year so it's important to match the year. Is this an OCR issue perhaps?
Thank you for your reply.
I don't know how the unicode got into the PDF; I'm using statements downloaded from my brokerage's website and it's hard to imagine that they OCRd them. The eights are bad in the years only during 2008, in the day of 12/28/99 and other such patterned ways. So, I think someone made a systemic error in creating the PDFs.
In any case ...
I'm using the following condition:
<contents> <contain match> { <stmtDateMTD>,200<unicode character>, month-to-date statement }
where <stmtDateMTD> is a Custom date pattern defined as { <December><31> }
As a result, stmtDateMTD contains only the month and day in the PDF and the year of System Date.
My action is:
<rename> with pattern {_2008-<stmtDateMTD><extension>}
So, I was looking for a way to assign a date's year to stmtDateMTD.
I can't use the "Adjust Date..." option on the month because I need to adjust it only for February (when the month-end date is being incremented to March 1 because the System Date is NOT a leap year), not the rest of the months. Alternatively, I could hard code an adjustment to the year, but adjustment has to be different depending on the year that Hazel runs.
The only kludge I can think of is to add a new rule to look for file names with March 1 and change them to February 29.
Is there any way that I can avoid the kludge of an additional rule?
Is there anyway to *assign* (not adjust) a the year in stmtDateMTD?
Thank you for reading.
- nello