Symfony 使用KnpTimeBundle
2024-09-04 19:33:01
使用time_diff时出现:diff.ago.hour;
解决:
1:引入"knplabs/knp-time-bundle": "^1.7",
https://github.com/KnpLabs/KnpTimeBundle
2:new Knp\Bundle\TimeBundle\KnpTimeBundle(),
3:配置config.yml
framework:
#esi: ~
translator: { fallbacks: ['%locale%'] } 这样时间是显示正常了 2 小时前
最新文章
- 离线安装 Python 2.7, paramiko 和 tornado
- linux下flash的安装
- jQuery—DOM操作
- ARM指令集(上)
- Twitter 登录和分享
- UIWebView swift
- 从user 登陆開始
- linux内核分析之内存管理
- 【noip2007】树网的核
- poj 3687 Labeling Balls【反向拓扑】
- ArcGis : unable to save as template this document is already based on another template
- An impassioned circulation of affection
- Java项目专栏之数据库建表
- python多线程与多进程--存活主机ping扫描以及爬取股票价格
- CSAPC2008 skyline
- 【JS面试向】选择排序、桶排序、冒泡排序和快速排序简介
- beanutils的使用
- jQuery学习之二
- Kattis之旅——Factovisors
- java中String new和直接赋值的区别