1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
class Date// c'est la que comence l'erreur
{
// {{{ Properties
/**
* the year
* @var int
*/
var $year;
/**
* the month
* @var int
*/
var $month;
/**
* the day
* @var int
*/
var $day;
/**
* the hour
* @var int
*/
var $hour;
/**
* the minute
* @var int
*/
var $minute;
/**
* the second
* @var int
*/
var $second;
/**
* the parts of a second
* @var float
*/
var $partsecond;
/**
* timezone for this date
* @var object Date_TimeZone
*/
var $tz;
/**
* define the default weekday abbreviation length
* used by ::format()
* @var int
*/
var $getWeekdayAbbrnameLength = 3;
// }}}
// {{{ Constructor
/**
* Constructor
*
* Creates a new Date Object initialized to the current date/time in the
* system-default timezone by default. A date optionally
* passed in may be in the ISO 8601, TIMESTAMP or UNIXTIME format,
* or another Date object. If no date is passed, the current date/time
* is used.
*
* @access public
* @see setDate()
* @param mixed $date optional - date/time to initialize
* @return object Date the new Date object
*/
function Date($date = null)
{
$this->tz = Date_TimeZone::getDefault();
if (is_null($date)) {
$this->setDate(date("Y-m-d H:i:s"));
} elseif (is_a($date, 'Date')) {
$this->copy($date);
} else {
$this->setDate($date);
}
} |
Partager