IntlDateFormatter::parse() - IntlDateFormatter类
IntlDateFormatter::parse()
datefmt_parse
(PHP 5 >= 5.3.0, PHP 7, PECL intl >= 1.0.0)
Parse string to a timestamp value
说明
面向对象风格publicIntlDateFormatter::parse(string $value[,int &$position]): int过程化风格
datefmt_parse(IntlDateFormatter$fmt,string $value[,int &$position]): int
Converts string $value to an incremental time value, starting at $parse_pos and consuming as much of the input value as possible.
参数
$fmtThe formatter resource
$valuestring to convert to a time
$positionPosition at which to start the parsing in $value(zero-based). If no error occurs before $value is consumed,$parse_pos will contain -1 otherwise it will contain the position at which parsing ended(and the error occurred). This variable will contain the end position if the parse fails. If $parse_pos > strlen($value), the parse fails immediately.
返回值
timestamp parsed value, or FALSE
if value can't be parsed.
范例
OO example
datefmt_parse() example
鹏仔微信 15129739599 鹏仔QQ344225443 鹏仔前端 pjxi.com 共享博客 sharedbk.com
图片声明:本站部分配图来自网络。本站只作为美观性配图使用,无任何非法侵犯第三方意图,一切解释权归图片著作权方,本站不承担任何责任。如有恶意碰瓷者,必当奉陪到底严惩不贷!