I'm writing an API and I would like to accept ISO 8601 format for date and time. I want to accept only that format. I'm using dateutil
at the moment, but its parse function accepts all manner of formats unrelated to ISO8601. I have a simple regex checking the format now, but the actual standard allows a lot more than what my regex does.
Is there a simple function/module which provides a way to parse only 8601 formatted dates/times?