def _pretty_print(table): return indent(table, hasHeader=True)
"15/08", #"22:59:60", ] if True: rows = [] for string in dates: try: row = [str(x) for x in string, parseDateTime(string, USA=False), parseDateTime(string, USA=True)] rows.append(row) except Exception, why: print "%s: %s" % (why.__class__.__name__,why) labels = ("string","parseDateTime","parseDateTime(US)") print indent([labels]+rows, hasHeader=True) else: rows = [] for string in dates: try: row = [str(x) for x in string, mx.DateTime.DateTimeFrom(string), DateTimeFrom(string), DateTimeFrom(string,USA=True)] if row[1] != row[2] or row[1] != row[3]: rows.append(row) except Exception, why: print "%s: %s" % (why.__class__.__name__,why) labels = ("string", "mx.DateTime.DateTimeFrom", "parseDateTime", "parseDateTime(US)")
if vals[0] != vals[1]: print ">>>", exprs[1] print vals[1] if 0: rows = [] for string in datetimes: try: row = [str(x) for x in string, parseDateTime(string, USA=False), parseDateTime(string, USA=True)] rows.append(row) except Exception, why: print "%s: %s" % (why.__class__.__name__,why) labels = ("string","parseDateTime","parseDateTime(US)") print indent([labels]+rows, hasHeader=True) if 0: rows = [] for string in datetimes: try: row = [str(x) for x in string, mx.DateTime.DateTimeFrom(string), parseDateTime(string), parseDateTime(string,USA=True)] if row[1] != row[2] or row[1] != row[3]: rows.append(row) except Exception, why: print "%s: %s" % (why.__class__.__name__,why) labels = ("string", "mx.DateTime.DateTimeFrom", "parseDateTime", "parseDateTime(US)")