I’m at a loss, and nearly bald…
Palm Desktop doesn’t return appointments in chronological (or creation, for that matter) order, but I need to return them as such. Part of a much longer script returns a list of appointments in the following format:
{{apptTime:date "Friday, January 1, 1904 6:30:00 PM", apptTitle:"Huntington"}, {apptTime:date "Friday, January 1, 1904 8:30:00 PM", apptTitle:"Drive"}, {apptTime:date "Friday, January 1, 1904 4:00:00 PM", apptTitle:"Drive"}, {apptTime:date "Friday, January 1, 1904 8:30:00 AM", apptTitle:"MB Staff Meeting"}}
I need to sort them by apptTime, so I’d get a new list back:
{{apptTime:date "Friday, January 1, 1904 8:30:00 AM", apptTitle:"MB Staff Meeting"}, {apptTime:date "Friday, January 1, 1904 4:00:00 PM", apptTitle:"Drive"}, {apptTime:date "Friday, January 1, 1904 6:30:00 PM", apptTitle:"Huntington"}, {apptTime:date "Friday, January 1, 1904 8:30:00 PM", apptTitle:"Drive"}}
This is going to be deployed on an array of machines running OS8 through OSX 10.2, so I’d like to stick with as plain vanilla applescript as i can. I tried to write a binary insertion sort handler, but have only succeeded in making myself that much closer to bald…
Is there a simple way to sort a list of records by one property, that property being a time (date)?