return null for earliest and latest.