Sort dates for timeline to avoid wierd graphs