Add support for external contracts

As even iso8601 dates are quite difficult to get right, I've added support for external contracts.

@llambeau could you review this?