Django Book 翻译
菜单>:
TOC
返回
原文:
Takes an optional argument that is a variable containing the date to use as the comparison point (without the argument, the comparison point is *now* ). For example, if ``blog_date`` is a date instance representing midnight on 1 June 2006, and ``comment_date`` is a date instance for 08:00 on 1 June 2006, then ``{{ comment_date|timesince:blog_date }}`` would return 8 hours.
翻译:
接受一个可选的参数,该参数是一个包含比较日期的变量(该参数默认值是 now). 举例来说, 如果 blog_date 是一个日期实例表示 2006-06-01 午夜, 而 comment_date 是一个日期实例表示 2006-06-01 早上8点,那么 {{ comment_date|timesince:blog_date }} 将返回 "8 hours".
备注:
译者: