Skip to content

Instantly share code, notes, and snippets.

@whitmanc
Forked from stevenpsmith/snippet.js
Created April 30, 2012 04:41
Show Gist options
  • Save whitmanc/2555572 to your computer and use it in GitHub Desktop.
Save whitmanc/2555572 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