Clean up handling of datetimes for parsing, add commentary

It is possible to receive datetime objects, not just strings at that
stage. In the event that we do, handle them correctly and use the same
stringification code path.
Remove all the crazy whitespace!