RE: [PHP] timestamp question
| From: | Vamsi Nath | Date: | Thu, 10 Aug 2000 20:46:38 +0000 |
| Subject: | RE: [PHP] timestamp question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11216@lists.php.net to get a copy of this message | ||
Assuming you want the timestamp for midnight the first day of the month,
this should work:
function timestamp($month) {
return mktime(0,0,0,$month,1,2000);
}
Hope this is what you are looking for.
--Vamsi
http://php.vamsi.net
-----Original Message-----
From: Paulson, Joseph V. "Jay" [mailto:jay.paulson@viatel.com]
Sent: Thursday, August 10, 2000 12:43 PM
To: php-general@lists.php.net
Subject: [PHP] timestamp question
Hello everyone--
Thanks for the help with the calendar function stuff I just asked. Now
here's a question for everyone, but let me explain it first. Here's some
code to help out.
$timestamp = time();
$month = date("n", $timestamp);
Okay this get's you the month as a number (i.e. 8). What I want to do is
reverse this process. I want to start off with the $month = 8; and then get
a $timestamp. Does anyone know if and how you can do this?
$month = 8;
$timestamp = time($month); //???? this isn't how you do this
//but I don't have a clue how you would
do it...
Thanks,
Jay Paulson
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net