<?php
class IXR_Date {
var $year;
var $month;
var $day;
var $hour;
var $minute;
var $second;
var $timezone;
function __construct( $time )
{
if (is_numeric($time)) {
$this->parseTimestamp($time);
} else {
$this->parseIso($time);
}
}
public function IXR_Date( $time ) {
self::__construct( $time );
}
function parseTimestamp($timestamp)
{
$this->year = gmdate('Y', $timestamp);
$this->month = gmdate('m', $timestamp);
$this->day = gmdate('d', $timestamp);
$this->hour = gmdate('H', $timestamp);
$this->minute = gmdate('i', $timestamp);
$this->second = gmdate('s', $timestamp);