I like the method extraction, but I prefer 

```
function parseResult(startDate, endDate) { 
   ...
}
```

To creating a `var`.