• 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: Finding the oldest date in a list
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding the oldest date in a list


  • Subject: Re: Finding the oldest date in a list
  • From: Walter Ian Kaye <email@hidden>
  • Date: Tue, 18 May 2004 16:33:20 -0700

At 06:24p -0400 05/18/2004, Graff didst inscribe upon an electronic papyrus:

For AppleScript prior to 1.9.0 you need this script:
----
set BackUpFolder to {"5/11/2004", "5/12/2004", "5/13/2004", "5/14/2004", "5/17/2004", "5/18/2004"}

set oldestDate to date (item 1 of BackUpFolder)
set dateList to rest of BackUpFolder

repeat with textDate in dateList
if (date textDate) < oldestDate then

For the record, (date textDate) does NOT work on my system, 10.2.8.

Well, it works with a literal string (date "5/11/2004"), but it throws an error when used with a variable.


-boo
_______________________________________________
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: Finding the oldest date in a list
      • From: Michelle Steiner <email@hidden>
References: 
 >Finding the oldest date in a list (From: Steven Valenti <email@hidden>)
 >Re: Finding the oldest date in a list (From: Graff <email@hidden>)

  • Prev by Date: RE:First Applescript
  • Next by Date: Re: Minimizing non-Frontmost Windows
  • Previous by thread: Re: Finding the oldest date in a list
  • Next by thread: Re: Finding the oldest date in a list
  • Index(es):
    • Date
    • Thread