Use embedded function or closure to sort task by Date.