Fix infinite loop parsing date string missing a closing brace.

For example, "~d {foo"
Support single date ~d DATE syntax.