Find Nearest Date / Time.

I have lines of text that begin with a time stamp

The digit after the comma is milliseconds.

I want to search through (the dictionary) and find the nearest time stamp that matches my ‘current’ time.
There may be more than one match.

I’ve written a class that inherits from Date and adds a property called milliseconds…
How do I write a comparison operator for the class?
i.e. > = <

Dictionary may be wrong data structure for this.
Sounds more like a binary search in an sorted array of timestamps.

See Operators
http://documentation.xojo.com/index.php/Operator_Compare

if time and date are equal, compare microseconds.

[quote=177294:@Brian O’Brien]I have lines of text that begin with a time stamp

The digit after the comma is milliseconds.

I want to search through (the dictionary) and find the nearest time stamp that matches my ‘current’ time.
There may be more than one match.[/quote]

Simply place all these extended dates together with the current time in an array and sort it. The closest will automatically be next or before.