I have two dates in JavaScript, `start` and `finish`, parsed by [Moment.js](http://momentjs.com/). What would be the most efficient way to swap them if `start` is posterior to `finish` without having to create a third date? Typically, the dates would be parameters of a function like this one:

```
function getDates(start, finish) {
  var start_date = moment(new Date(start));
  var finish_date = moment(new Date(finish));
  if (start_date.diff(finish_date) > 0) {
    // Swap code goes here...
  }
}

```

The reason why one might want to swap dates is because some functions are defined in such a way that the same result is returned even if the dates are swapped, yet the function needs to know which date is the earlier one. For example, [YEARFRAC](http://office.microsoft.com/en-us/excel-help/yearfrac-function-HA102752812.aspx?CTT=5&origin=HA102752955) in Microsoft Excel works that way. You can see my implementation of that function [here](https://gist.github.com/4567843) for an example of a sub-optimal date swapping.

Thanks in advance for your help!