• 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 problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Date problems


  • Subject: Re: Date problems
  • From: John Delacour <email@hidden>
  • Date: Mon, 26 Aug 2002 21:16:25 +0100

At 8:07 am -1000 26/8/02, Reinhold Penner wrote:

...and now try this:

tell application "Finder"
set myDate to "Sun, 25 Aug, 2002 14:43:04"
set myDate to date myDate
end tell

...I have resorted to parse the string into an integer representation that I can use to compare dates numerically on both systems and have abandoned the date coercion.

What on earth has the Finder to do with it?

Do this...

set myDate to "Sun, 25 Aug, 2002 14:43:04"
set myDate to date myDate

or do this if you must...

tell application "Finder"
set myDate to "Sun, 25 Aug, 2002 14:43:04"
set myDate to my date myDate
end tell


You can see, if you look at the finder dictionary that date is a constant in a suit that is only half-baked in 10.1.*, but it's a golden rule never to include any terms that you don't need and do work wherever possible OUTSIDE a tell block.

JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Date problems
      • From: Paul Berkowitz <email@hidden>
    • Re: Date problems
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Date problems (From: Reinhold Penner <email@hidden>)

  • Prev by Date: Re: Moving (to) Mail....
  • Next by Date: Re: Date problems
  • Previous by thread: Re: Date problems
  • Next by thread: Re: Date problems
  • Index(es):
    • Date
    • Thread