Re: {PEAR} Calendar getTimeStamp problem

From: Date: Thu, 06 Oct 2005 15:12:36 +0000
Subject: Re: {PEAR} Calendar getTimeStamp problem
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21262@lists.php.net to get a copy of this message
Lorenzo Alberton wrote:
Hi Gerard,
Is it possible to use the $Month->getTimeStamp() with the PearDate CALENDAR_ENGINE. If I use the following define('CALENDAR_ENGINE', 'PearDate'); $Month = new Calendar_Month_Weekdays($year, $month); $Month->getTimeStamp(); it returns January 1970, however if I do not set the 'CALENDAR_ENGINE' everything works fine.
==================================== <?php define('CALENDAR_ENGINE', 'PearDate'); require_once 'Calendar/Month/Weekdays.php'; $Month = new Calendar_Month_Weekdays(2005, 10); echo $Month->getTimeStamp(); ?> ==================================== output: "2005-10-01 00:00:00". Regards,
Thanks Lorenzo, My mistake. $Month->getTimeStamp works fine I was using the date function to format the date, but getTimeStamp does not return a Unix timestamp, so it was returning 01 January 1970. date('F Y', $Month->getTimeStamp()) Is there a way to easy format the iso-8601 date format eg. ruturn October 2005 Ger

« previous php.pear.general (#21262) next »