set pdfFileDate to date myDocName -->>invalid date and time date Sep-14-Mon TV Grid .indd of «script».
Worked in Leopard, now breaks.
Isn't it normal ?
The release notes states:
Previous versions would accept anything that looked even vaguely like a date: the string could omit components, reorder others, add or omit punctuation, and so on. In AppleScript 2.1, the string must exactly match one of the system date formats (full, long, medium, or short; see System Preferences > International > Formats for examples), including all punctuation and whitespace.
If I understand well, your file name doesn't match this requirement. The year is missing .
Well, yes, but as Chris Nebel said:
It's actually more flexible than the release notes say (they were accurate at the time). I need to confirm this with the ICU people, but it looks like it requires that the components all be present in the right order, but the punctuation and white space between them doesn't matter. For example, on my US system, "9/4/2009", "9-4-2009", and "9 4 2009" all evaluate to September 4, 2009.
The Chris's response is about separators, not about the fact that every components are required.
Your file name is: "Sep-14-Mon TV Grid.indd"
There is no year value in it and this is why the script fails.
Try with "Sep-14-Mon 2009 TV Grid.indd"
Yvan KOENIG (VALLAURIS, France) dimanche 13 septembre 2009 09:19:09
|