JavaScript Jak sortować węzły z DOM

var list = document.getElementById('list');

[...list.children]
  .sort( (a, b) => a.getAttribute('data-date') - b.getAttribute('data-date'))
  .forEach( node => list.appendChild(node));
DCmax1k