generalize the variable replacement for more than just dates and times