V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Tornado Documentation
http://www.v2ex.com/tornado/
Tornado on GitHub
https://github.com/facebook/tornado/
Tornado Gists
http://tornadogists.org/
tornadoxyz
V2EX  ›  Tornado

tornado.locale.format_date()的日期汉化问题

  •  
  •   tornadoxyz · 2015-05-19 09:08:12 +08:00 · 4585 次点击
    这是一个创建于 3263 天前的主题,其中的信息可能已经有所发展或是发生改变。
    在Introduction to tornado一书中,使用
    ```
    {{ locale.format_date() }}
    ```
    函数对时间戳进行转化,可是转换后的结果为英文的,例如 2 seconds ago,有没有方法将其汉化为中文呢?粗略的看过tornado.locale模块的源码,可还是一头雾水。望各位朋友不吝赐教。
    2 条回复    2015-09-22 14:38:50 +08:00
    SCaffrey
        1
    SCaffrey  
       2015-05-22 11:50:28 +08:00
    前排帮顶阿……
    (尽量对别人有帮助)
    heofonum
        2
    heofonum  
       2015-09-22 14:38:50 +08:00
    relative=False
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3987 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 00:57 · PVG 08:57 · LAX 17:57 · JFK 20:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.