m1ke / date-helper

快速CLI日期辅助工具,避免需要检查参考

1.0.2 2018-08-15 17:01 UTC

This package is auto-updated.

Last update: 2024-09-13 21:00:23 UTC


README

提供CLI中的快速日期格式化键。

使用composer安装,全局安装最佳

composer global require m1ke/date-helper

将您的composer全局bin目录添加到$PATH中很有用;目录通常是:$HOME/.composer/vendor/bin/

如果它在您的$PATH中,您可以从任何命令行运行php-date-helper,并会产生以下输出

d/j Date of month (with/out leading zeroes)
D/l Day text (short/long)
S   Suffix st,nd,rd,th
z   Day of year
F/M Month text (long/short)
m/n Month (with/out leading zeroes)
Y/y Year (4/2 digit)
a/A am or pm
h/g Hour (12hr, with/out leading zeroes)
H/G Hour (24hr, with/out leading zeries)
i   Minutes
s   Seconds
u   Microseconds

欢迎贡献以添加更多日期或改进措辞/格式!