editor.on("instanceReady", function () {
        // TODO: Don't duplicate this function. Bad!
        var text = editor.getData();
        dates = chrono.parse(text)
            .sort(function (a, b) {