#NEWLINE# def parse_time( t ) : #NEWLINE# #INDENT# '\n  Parse a time value from a string, return a float in Unix epoch format.\n  If no time can be parsed from the string, return None.\n  ' #NEWLINE# try : #NEWLINE# #INDENT# return float ( t ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# match = cal . parse ( t ) #NEWLINE# if ( match and match [ 1 ] ) : #NEWLINE# #INDENT# return time . mktime ( match [ 0 ] ) #NEWLINE# #UNINDENT# #UNINDENT# return None