note 79378 added to ref.datetime
| From: | wdpimenta at gmail dot com | Date: | Fri, 23 Nov 2007 18:22:27 +0000 |
| Subject: | note 79378 added to ref.datetime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-132515@lists.php.net to get a copy of this message | ||
function diff($sDateBegin, $sDateEnd){
$sDateBegin = is_string($sDateBegin)? strtotime($sDateBegin):$sDateBegin;
$sDateEnd = is_string($sDateEnd) ? strtotime($sDateEnd) :$sDateEnd;
$iDateBegin = ceil($sDateBegin / 86400 + 25568);
$iDateEnd = ceil($sDateEnd / 86400 + 25568);
return $iDateEnd - $iDateBegin;
}
echo diff('2007-01-15', '2007-01-25');
----
Server IP: 69.147.83.197
Probable Submitter: 201.22.164.121
----
Manual Page -- http://www.php.net/manual/en/ref.datetime.php
Edit -- https://master.php.net/note/edit/79378
Del: integrated -- https://master.php.net/note/delete/79378/integrated
Del: useless -- https://master.php.net/note/delete/79378/useless
Del: bad code -- https://master.php.net/note/delete/79378/bad+code
Del: spam -- https://master.php.net/note/delete/79378/spam
Del: non-english -- https://master.php.net/note/delete/79378/non-english
Del: in docs -- https://master.php.net/note/delete/79378/in+docs
Del: other reasons-- https://master.php.net/note/delete/79378
Reject -- https://master.php.net/note/reject/79378
Search -- https://master.php.net/manage/user-notes.php