strtotime

    0热度

    1回答

    我正在敲我的头一点点strtotime,并试图找出如何得到我需要实现的。 生病写在逻辑我不需要我需要的PHP。 $today = today $lastUpdated = query from DB if today is >= $lastUpdated(next week) do something else do something else 基本上只允许有人每周提交一次表格,

    2热度

    1回答

    如果现在是2016年2月10日 我需要返回2015年7月1日(或2015年7月10日) strtotime('july'); // returns 2016-07-10 strtotime('last july'); // does not work strtotime('july 2015'); // I have not '2015' for query. //Only if compa

    0热度

    3回答

    返回一周的错误 我有以下数据出来的date_parse: $date_array['year'] = '2015'; $date_array['month'] = '4'; $date_array['day'] = '25'; 我试图让一周的某一天为这个特定日期: echo date('w',strtotime($date_array['day'] . " " . $date_array[

    0热度

    1回答

    我有PHP的功能,从这个和下周得到日期。除了星期四外,一切都很好 - 星期四的输出是空的。 这里是我的代码: $pondeli1 = date('d.m.Y', strtotime('monday this week')); $utery1 = date('d.m.Y', strtotime('tuesday this week')); $streda1 = date('d.m.Y', str

    1热度

    3回答

    因此,Im为数据抓取一个网站,一个数据,即时消息是某些项目的日期。 这些项目的日期格式为“2015年3月11日星期三”。 我一直试图然后插入到我的mysql数据库。数据库的结构包含与“datapublished”作为时间戳的字段, `feeddatapublished` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_T

    6热度

    2回答

    我想了解最新功能strtotime()的以下行为: strtotime(1420066800)回报false,符合市场预期。 strtotime(1451602800)返回26197048320!但预计false为1451602800不是有效的日期和时间格式。 (与new DateTime(1451602800)同样的事情也一样) 我读了整个Supported Date and Time Form

    0热度

    1回答

    我需要比用户输入日期提前35年的日期。 在PHP下面的代码 $DoCndm=date("Y-m-d",strtotime($_POST['DoH'] ." +35 years")); 我发现它工作正常高达22年但对于23及以上为返回输出1970-01-01 ..它是一个错误?

    2热度

    3回答

    我已经创建了一个博客并设置了它,以便在每个博客文章中显示该博文的发布日期,我总是使用stroftime()并获取记录来自存储帖子的MySQL数据库的日期。 这一直工作,但我刚刚换了新的虚拟主机,当我尝试使用原来的代码: <?php $date = strtotime($post['post_date']); echo date('F jS, Y', $date); ?> 我得到一个

    0热度

    1回答

    使用strtotime WEEK获得1970年的第00周?我正在使用一个大功能,所以无法在这里发布。 我期待通过周获得周天。 for ($weekNumber=00;$weekNumber<=$weekEnd;$weekNumber++) { runTheScript($weekNumber,$month,$weekStart,$weekEnd,$link,$limit,$standa

    0热度

    2回答

    我想更新一个unix时间戳并添加x个月。 这是我使用1456256866 strtotime("+1 month") 我想accieve什么是时间戳: $time = '1456256866'; //update $time with x months something like $time("+5 month"); 有人可以把我在正确的方向? ,不胜感谢