Skip to content

Instantly share code, notes, and snippets.

@stevenpsmith
Created December 22, 2011 17:28
Show Gist options
  • Save stevenpsmith/1511105 to your computer and use it in GitHub Desktop.
Save stevenpsmith/1511105 to your computer and use it in GitHub Desktop.
exercise.Activities = Backbone.Collection.extend({
model: exercise.Activity,
url: "exercise.json",
comparator: function(activity){
var date = new Date(activity.get('date'));
return date.getTime();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment