title: Why does appending a string to a Date invoke toString() rather than valueOf()?
body: <p>Just stumbled upon this today and I couldn't find where this behavior is defined in the spec.</p>
  
  <p>Appending a string to an object in JavaScript (i.e. <code>new Object() + "whatever"</code>) typically triggers a call to <code>valueOf()</code> on the object, but apparently, Date objects are an exception to this rule: <code>new Date() + "..."</code> calls <code>toString()</code> on the Date instead.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function test(constructor)
  {
      var name = constructor.name || /^\s*function ([\w\$]+)/.exec(constructor.toString())[1];
      var obj = new constructor();
      obj.toString = function () { return name + ' : toString()'; }
      obj.valueOf = function () { return name + ' : valueOf()'; }
      document.body.appendChild(document.createElement('DIV')).textContent = obj + '';
  }
  
  test(Array);
  test(Boolean);
  test(Date);
  test(Function);
  test(Number);
  test(Object);
  test(RegExp);
  test(String);</code></pre>
  </div>
  </div>
  </p>
  
  <p>Question: what is different about Date objects here?</p>