MCPcopy Create free account
hub / github.com/everydo/zcms / getDisplayTime

Function getDisplayTime

zcms/utils.py:35–97  ·  view source on GitHub ↗

人性化的时间显示: (支持时区转换) time 是datetime类型,或者timestampe的服点数, 最后的show_mode是如下: - localdate: 直接转换为本地时间显示,到天 - localdatetime: 直接转换为本地时间显示,到 年月日时分 - localtime: 直接转换为本地时间显示,到 时分 - deadline: 期限,和当前时间的比较天数差别,这个时候返回2个值的 ('late', '12天前') - humandate: 人可阅读的天,今天、明天、后天、昨天、前天,或者具体年月日 ('to

(input_time, show_mode='localdate')

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

blog_viewFunction · 0.90
blog_post_viewFunction · 0.90
render_newsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected