Re: Re: best way to do this with arrays...
| From: | Michal Migurski | Date: | Mon, 24 May 2004 14:18:26 +0000 |
| Subject: | Re: Re: best way to do this with arrays... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-186827@lists.php.net to get a copy of this message | ||
> $start = '2004-07-04';
> $end = '2004-07-09';
> $check = '2004-07-06'; // the date you want to check
>
> $timestampStart =
> mktime(0,0,0,substr($start,5,2),substr($start,8,2),substr($start,0,4));
> $timestampEnd =
> mktime(0,0,0,substr($end,5,2),substr($end,8,2),substr($end,0,4));
> $timestampCheck =
> mktime(0,0,0,substr($check,5,2),substr($check,8,2),substr($check,0,4));
FYI, the above can be shortened to:
$timestampStart = strtotime($start);
$timestampEnd = strtotime($end);
$timestampCheck = strtotime($check);
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html