function sort_toDo_List_by_date(){
        thingsToDo.sort(function (a, b) {
            return new Date(a.toCompleteDate)-new Date(b.toCompleteDate);
        });     
    }
//Sort thingsToDo (An Array) by Date

Sort thingsToDo (An Array) by Date
Sort thingsToDo ( An Array ) by Date
function sort_toDo_List_by_date(){
        thingsToDo.sort(function (a, b) {
            return new Date(a.toCompleteDate)-new Date(b.toCompleteDate);
        });     
    }
function sort_toDo_List_by_date ( ) { thingsToDo . sort ( function ( a , b ) { return new Date ( a . toCompleteDate ) - new Date ( b . toCompleteDate ) ; } ) ; }
Sort thingsToDo (An Array) by Date
Sort thingsToDo ( An Array ) by Date