Loosen restrictions on relative dates, add tests.

Sorry for delay, kept forgetting about sending this along. OSS patching is complicated.