Here is an Example of Date sorting in javascript
Its the source you need to look at to see how it all works.
Its got lots of rem statments included ... {-}={-}
NOTE: If you see "no venus" etc ... add some current dates to the 'VenuDates Array' ...
Hope it helps someone - EN_Dulge!