sort the positions array by date every time