Add mechanism to create back/forward-dated posts.

Also, DRY up input handling and hoist some common code in preparation for moving it into a proper module.

(Updated pull request, to merge cleanly against current 2.1 branch...)