DateTime::format
DateTimeImmutable::format
DateTimeInterface::format
date_format
Devuelve la fecha formateada según el formato dado
&reftitle.description;
&style.oop;
public stringDateTime::format
stringformat
public stringDateTimeImmutable::format
stringformat
public stringDateTimeInterface::format
stringformat
&style.procedural;
stringdate_format
DateTimeInterfaceobject
stringformat
Devuelve la fecha formateada según el formato dado.
&reftitle.parameters;
&date.datetime.description;
format
Formato aceptado por date.
&reftitle.returnvalues;
Devuelve la fecha formateada en caso de éxito &return.falseforfailure;.
&reftitle.examples;
Ejemplo de DateTime::format
&style.oop;
format('Y-m-d H:i:s');
?>
]]>
&style.procedural;
]]>
&example.outputs;
&reftitle.notes;
Este método no usa configuraciones regionales. Todas las salidas están en inglés.
&reftitle.seealso;
date