Reduce recalculation needed for RelativeDates

Capture more state in closure scopes. Pretty clever, at the expense of
simplicity.