Maybe this would be clearer if you called `getFirstValue()`, subtracted the startDate if it's a duration, and then returned the value `toSeconds()`?