Add defensive code to "addd" and "addt" [InputParser]

Check if there are at least 1 or 2 Date objects respectively.

Minor update: Format code in InputParser.