I am definitely not a programmer, and for sure not the one who could guide you on writing a sort function.  HOWEVER, emacs has a really nice facility for doing so, if you decide you want to try that. 

I had to write a program to alphabetize a lexical list in Chuukese, in an arbitrary order other than standard english alphabetical order.  I had to have guidance, but it was certainly possible, even for me.

Just some encouragement, but it's been many years, and i am unable to offer more than that.
 
http://www.gnu.org/software/emacs/manual/html_node/elisp/Sorting.html

Alan

On Sat, Mar 3, 2012 at 8:23 AM, James Harkins <jamshark70@gmail.com> wrote:
At Fri, 02 Mar 2012 21:48:42 -0500,
Bernt Hansen wrote:
> You could write a custom sorting function that parses out the date from
> the heading and compares them.  There may be a better way to do this
> that I'm not aware of for this.
>
> Set this function up in org-agenda-cmp-user-defined and
> org-agenda-sorting-strategy to get the results you want.

OK, thanks. I was starting to think it would come to that. Kind of surprising this isn't offered out of the box.

I think I need a bit more guidance, from you or someone else.

> parses out the date from the heading

Is there already an org function to do this? C-h a searches on the following yielded nothing that seemed interesting.

org.*date.*
org.*timestamp.*

> compares them

I was about to make that more complicated, but actually string comparison should be fine for this. No worries there.

I have done rather little with emacs-lisp so... this is uphill for me. Thanks.

James


--
James Harkins /// dewdrop world
jamshark70@dewdrop-world.net
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks