def process_result_value(self, value, dialect=None): """ Convert a MediaWiki timestamp to a datetime object. To unbundle we have to detect unicodestrings that are set as mysql defaults they are not represented by singleton None """ if not value or value == UNICODE_NULL * 14: return None return parse_date(value)
def d(integer): """ helper function to parse dates from integers in the mediawiki timestamp format """ return parse_date(str(integer))