strtotime(PHP 日期函数)算法如何工作? [英] How algorithm of strtotime(PHP Date function) Works?

查看:28
本文介绍了strtotime(PHP 日期函数)算法如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 我想知道 strtotime(php 日期函数)是如何工作的?
  2. 如何将字符串 Like "15 September 2012" 解析为 timeStamp
  3. 有没有更好的算法?
  1. i wanna to know how strtotime (php Date function) work?
  2. how Parse string Like "15 September 2012" to timeStamp
  3. is there any better algorithm?

我的目的是为波斯语更改此功能

my purpose is changing this function for Persian Language

推荐答案

您可以浏览 PHP 的源代码 ( https://github.com/php/php-src) 并搜索函数以查看其实现.

You can browse the source code of PHP ( https://github.com/php/php-src) and search function to see its implementation.

更新

这里是函数strtotime()的算法https://github.com/php/php-src/blob/master/ext/date/php_date.c#L1324

Here is the algorithm of the function strtotime () https://github.com/php/php-src/blob/master/ext/date/php_date.c#L1324

问候!

这篇关于strtotime(PHP 日期函数)算法如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆