Add 'sortby', with some time pkg support