mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 08:22:08 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@334774 c90b9560-bf6c-de11-be94-00142212c4b1
214 lines
5.8 KiB
XML
214 lines
5.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 14af302c9c0e561fa6f9cdd956268758ba9a89c5 Maintainer: seros Status: ready -->
|
|
<refentry xml:id="function.date-sunset" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>date_sunset</refname>
|
|
<refpurpose>
|
|
Devuelve la hora de la puesta de sol de un día y ubicación dados
|
|
</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>mixed</type><methodname>date_sunset</methodname>
|
|
<methodparam><type>int</type><parameter>timestamp</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>format</parameter><initializer>SUNFUNCS_RET_STRING</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>latitude</parameter><initializer>ini_get("date.default_latitude")</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>longitude</parameter><initializer>ini_get("date.default_longitude")</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>zenith</parameter><initializer>ini_get("date.sunset_zenith")</initializer></methodparam>
|
|
<methodparam choice="opt"><type>float</type><parameter>gmt_offset</parameter><initializer>0</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>date_sunset</function> devuelve la hora de la puesta de sol para un día
|
|
(especificado como <parameter>timestamp</parameter>) y ubicación dados.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>timestamp</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La marca de tiempo <parameter>timestamp</parameter> del día del que se va a tomar
|
|
la puesta de sol.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>format</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
<table>
|
|
<title>Constantes <parameter>format</parameter></title>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>constante</entry>
|
|
<entry>descripción</entry>
|
|
<entry>ejemplo</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>SUNFUNCS_RET_STRING</entry>
|
|
<entry>devuelve el resultado como <type>string</type></entry>
|
|
<entry>16:46</entry>
|
|
</row>
|
|
<row>
|
|
<entry>SUNFUNCS_RET_DOUBLE</entry>
|
|
<entry>devuelve el resultado como <type>float</type></entry>
|
|
<entry>16.78243132</entry>
|
|
</row>
|
|
<row>
|
|
<entry>SUNFUNCS_RET_TIMESTAMP</entry>
|
|
<entry>devuelve el resultado como <type>integer</type> (timestamp)</entry>
|
|
<entry>1095034606</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>latitude</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La latitud, por defecto a Norte, y como valor negativo a Sur.
|
|
Vea también: <literal>date.default_latitude</literal>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>longitude</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La longitud, por defecto a Este, y como valor negativo a Oeste.
|
|
Vea tambien: <literal>date.default_longitude</literal>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>zenith</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El cénit, por defecto: <literal>date.sunset_zenith</literal>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>gmtoffset</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
El índice GMT especificado en horas.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
|
|
&date.timezone.errors.description;
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="changelog">
|
|
&reftitle.changelog;
|
|
<para>
|
|
<informaltable>
|
|
<tgroup cols="2">
|
|
<thead>
|
|
<row>
|
|
<entry>&Version;</entry>
|
|
<entry>&Description;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
|
|
&date.timezone.errors.changelog;
|
|
|
|
</tbody>
|
|
</tgroup>
|
|
</informaltable>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve la hora de la puesta de sol en un formato <parameter>format</parameter> especificado
|
|
si se tuvo éxito &return.falseforfailure;.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <function>date_sunset</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
/* calcular la puesta de sol para Lisboa, Portugal
|
|
Latitud: 38.4 Norte
|
|
Longitud: 9 Oeste
|
|
Cenit ~= 90
|
|
Índice: +1 GMT
|
|
*/
|
|
|
|
echo date("D M d Y"). ', hora de la puesta de sol : ' .date_sunset(time(), SUNFUNCS_RET_STRING, 38.4, -9, 90, 1);
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
Mon Dec 20 2004, hora de la puesta de sol : 18:13
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>date_sunrise</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
|
|
-->
|