IntlCalendar::fromDateTime() - IntlCalendar类
IntlCalendar::fromDateTime()
(PHP 5 >= 5.5.0, PHP 7, PECL >= 3.0.0a2)
Create an IntlCalendar from a DateTime object or string
说明
面向对象风格publicstaticIntlCalendar::fromDateTime(mixed $dateTime): IntlCalendar过程化风格
intlcal_from_date_time(mixed $dateTime): IntlCalendar
Creates an IntlCalendar object either from a DateTime object or from a string from which a DateTime object can be built.
The new calendar will represent not only the same instant as the given DateTime(subject to precision loss for dates very far into the past or future), but also the same timezone(subject to the caveat that different timezone databases will be used, and therefore the results may differ).
参数
$dateTimeA DateTime object or a string that can be passed to DateTime::__construct().
返回值
The created IntlCalendar object or NULL
in case of failure. If a string is passed, any exception that occurs inside the DateTime constructor is propagated.
范例
IntlCalendar::fromDateTime()
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!