rymanalu/twitter-time-ago
Composer 安装命令:
composer require rymanalu/twitter-time-ago
包简介
Displays the date in a "time ago" format like Twitter.
关键字:
README 文档
README
This package provides a function to parse a datetime to human readable time difference like Twitter.
Installation
composer require rymanalu/twitter-time-ago
Usage
use Rymanalu\TwitterTimeAgo\TwitterTimeAgo; $timeAgo = new TwitterTimeAgo; // or `new TwitterTimeAgo($timezone)` echo $timeAgo->parse('2016-12-21 12:06:45'); // You can also just pass a date... echo $timeAgo->parse('2016-12-12'); // Using static method... echo TwitterTimeAgo::parse('2016-12-21 12:06:45'); // Using global helper... echo twitter_time_ago($datetime);
统计信息
- 总下载量: 73
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-12-21