Support start and end times and pre-period/post-period settings. Fixes #2.