def get_time_text(self, node, attr_key): """Returns the string for a timestamp""" timestamp = node.get_attr(attr_key, None) if timestamp is None: return u"" else: return get_str_timestamp(timestamp, formats=self._date_formats)
def format_timestamp(self, timestamp): return (get_str_timestamp(timestamp, formats=self._date_formats) if timestamp is not None else u"")