PHPackages                             newteng/format-date - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. newteng/format-date

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

newteng/format-date
===================

A simple time and date formatting component.

v0.0.1(6y ago)23MITPHPPHP &gt;=7.0.0CI failing

Since Apr 23Pushed 6y ago1 watchersCompare

[ Source](https://github.com/newteng/format-date)[ Packagist](https://packagist.org/packages/newteng/format-date)[ Docs](https://www.newteng.net)[ RSS](/packages/newteng-format-date/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

format-date
===========

[](#format-date)

一个简易的时间/日期转换工具，可以将`Y-m-d H:i:s`形式的时间日期转换为`刚刚`、`1 分钟前`、`60 分钟前`、`今天 11:58`、`昨天 12:00`等形式，常用于列表时间显示。

Installing
----------

[](#installing)

```
$ composer require newteng/format-date -vvv
```

Usage
-----

[](#usage)

### Common

[](#common)

```
