• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: date/Snow Leopard changed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: date/Snow Leopard changed


  • Subject: Re: date/Snow Leopard changed
  • From: "email@hidden" <email@hidden>
  • Date: Sat, 12 Sep 2009 22:05:14 -0700


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.


I was hopeful it would continue to assume the current year, I guess not. So while some scripts will break others won't. That particular script has been in use about 8 years. Didn't even have to modify the handler for OS x or when we went to InDesign.  Notice the extra space in the file name? No problem.  It would also work with a number of variations in the date in the file name.

I cannot recall Apple making a change to appleScript that removed a feature (automatic coercion of dates) and broke existing scripts without warning. I can't recall a destructive change like  this made with warning. Even if they're planning on removing some command from a dictionary they'll mark it as deprecated, but this is in AppleScript itself.

The good news is that now that these error messages are popping up on people's screens, they are beginning to realize they've been using appleScripts to get their work done.  Of course they are now cursing applescript at the same time, but at least they know it's applescript.

I even got a call from someone I don't know running a script I had forgotten about because of this change, so it's helping me meet new people. Annoyed and frustrated people, but they'll get over it.

ES
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: date/Snow Leopard changed
      • From: Yvan KOENIG <email@hidden>
References: 
 >Re: date/Snow Leopard changed (From: "Nigel Garvey" <email@hidden>)
 >Re: date/Snow Leopard changed (From: "Mark J. Reed" <email@hidden>)
 >Re: date/Snow Leopard changed (From: "Nigel Garvey" <email@hidden>)
 >Re: date/Snow Leopard changed (From: "Mark J. Reed" <email@hidden>)
 >Re: date/Snow Leopard changed (From: "email@hidden" <email@hidden>)
 >Re: date/Snow Leopard changed (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: Variable keeps changing with date manipulation in Snow Leopard
  • Next by Date: Re: Variable keeps changing with date manipulation in Snow Leopard
  • Previous by thread: Re: date/Snow Leopard changed
  • Next by thread: Re: date/Snow Leopard changed
  • Index(es):
    • Date
    • Thread