in scenario-notebooks/UserSecurityMetadata/Utils.py [0:0]
5 lines of code
2 McCabe index (conditional complexity)
def validatedate(timestr):
try:
datetime.datetime.strptime(timestr, '%Y-%m-%d')
except ValueError:
raise ValueError("Incorrect date format, should be yyyy-MM-dd")