mirror of
https://github.com/php/doc-es.git
synced 2026-03-25 16:02:13 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@321690 c90b9560-bf6c-de11-be94-00142212c4b1
143 lines
4.0 KiB
XML
143 lines
4.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 83c927f576b72abb11701326d9e33eb2fdfce8e3 Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: yes Maintainer: yago -->
|
|
<refentry xml:id="function.gmdate" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>gmdate</refname>
|
|
<refpurpose>Formatea una fecha/hora GMT/UTC</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>gmdate</methodname>
|
|
<methodparam><type>string</type><parameter>format</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>timestamp</parameter><initializer>time()</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Idéntica a la función <function>date</function> excepto que
|
|
la fecha/hora devuelta es en Greenwich Mean Time (GMT).
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>format</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El formato de la fecha (<type>string</type>) a mostrar. Ver las opciones de
|
|
formato de la función <function>date</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
&date.timestamp.description;
|
|
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve una fecha en formato GMT. Si se usa un valor no numérico en
|
|
<parameter>timestamp</parameter>, devolverá &false; y se lanzará
|
|
un error de nivel <constant>E_WARNING</constant>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>5.1.0</entry>
|
|
<entry>
|
|
El rango válido de una marca de tiempo es típicamente desde Fri, 13 Dec
|
|
1901 20:45:54 GMT a Tue, 19 Jan 2038 03:14:07 GMT. (Estas son
|
|
las fechas que corresponden a los valores mínimo y máximo de
|
|
un entero con signo de 32-bit). Sin embargo, antes de PHP 5.1.0 este rango estaba limitado
|
|
desde 01-01-1970 a 19-01-2038 en algunos sistemas (p.ej. Windows).
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry>5.1.1</entry>
|
|
<entry>
|
|
Hay <link linkend="datetime.constants">constantes</link> útiles
|
|
de formatos de fecha/hora estándar que se pueden usar para especificar el
|
|
parámetro <parameter>format</parameter>.
|
|
</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <function>gmdate</function></title>
|
|
<para>
|
|
Cuando se ejecuta en Finlandia (GMT +0200), la primera línea de abajo imprimirá "Jan 01
|
|
1998 00:00:00", mientras que la segunda imprimirá "Dec 31 1997 22:00:00".
|
|
</para>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
echo date("M d Y H:i:s", mktime(0, 0, 0, 1, 1, 1998));
|
|
echo gmdate("M d Y H:i:s", mktime(0, 0, 0, 1, 1, 1998));
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>date</function></member>
|
|
<member><function>mktime</function></member>
|
|
<member><function>gmmktime</function></member>
|
|
<member><function>strftime</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|