Hi,
I'm trying to extends the base class DateTime.
parent::createFromFormat("H.i d.m.Y", $string); returns a DateTime and I
want to convert it into a DateTimePlus (my own extended class). What's the
best way to do this plz ?
Some code:
class DateTimePlus extends DateTime
{
static function setFromGUIDateAndTime($date,$time ){
$string = $time.' '.$date;
//echo 'str:'.$string;
$res = parent::createFromFormat("H.i d.m.Y", $string);
return (DateTimePlus)parent::createFromFormat("H.i d.m.Y", $string);
}
Thk you
matt