What do you mean by "link" them, exactly?
That is to use "Tools > Advanced Editing > Link Tool" to create a link between the two dates so that one can jump from the top part of the document to the other location in the same document and vise-versa.
OK, I see. It's not so easy to do all of that with a script.
You would need to use the getPageNthWord method to try and identify the two dates on the page. Then you would need to use the getPageNthWordQuads method to get their exact locations, which you'll then need to convert to a rect array.
Then you would add the link using the addLink method and set its action to the location of the other date.
As I said, this is a complex task...
Thanks for the prompt reply. I will try.