public function setAttribute($key, $value)
    {
        if (in_array($key, $this->getDates()))
        {
            if ($value)
            {
                $value = $this->fromDateTime($value);
            }
        }

        $this->attributes[$key] = $value;
    }