datetimems:PHP 内置 DateTime 的扩展以使用微秒

时间:2021-07-09 20:32:57
【文件属性】:
文件名称:datetimems:PHP 内置 DateTime 的扩展以使用微秒
文件大小:13KB
文件格式:ZIP
更新时间:2021-07-09 20:32:57
PHP 日期时间MS 这个小型库使您能够以微秒精度进行时间计算。 PHP 的内置 DateTime 和 DateInterval 类不会这样做。 除了 DateTime 确实保留微秒,但会在其计算中忽略那些。 用法 通过需要这个库。 以与 DateTime 相同的方式使用。 这些类扩展了 DateTime,因此您可以在需要时替换旧类。 例子: $ dtToday = new \ DateTimeMS (); $ dtTomorrow = clone $ dtToday ; $ dtTomorrow -> modify ( "+1 day -1 microsecond" ); $ interval = $ dtToday -> diff ( $ dtTomorrow ); print "In between {$dtToday->format('D, H:i:s.u')} and the
【文件预览】:
datetimems-master
----composer.json(419B)
----tests()
--------bootstrap.php(57B)
--------DateTimeMSTest.php(5KB)
--------DateIntervalMSTest.php(682B)
----LICENSE(7KB)
----src()
--------DateIntervalMS.php(6KB)
--------DateTimeMS.php(16KB)
----.gitignore(21B)
----README.md(1KB)

网友评论