def _get_local_date(datestr, long_date=False):
'''returns the localized representation of the date provided by the api'''
result = ""
try:
if long_date:
result = arrow.get(datestr).strftime(xbmc.getRegion('datelong'))
else:
result = arrow.get(datestr).strftime(xbmc.getRegion('dateshort'))
except Exception as exc:
_log_msg("Exception in _get_local_date: %s" % exc)
return result
评论列表
文章目录