Files
doc-fr/reference/datetime/functions/time.xml
Yannick Torres bb40a13744 sync with EN
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@186386 c90b9560-bf6c-de11-be94-00142212c4b1
2005-05-14 17:05:33 +00:00

69 lines
1.6 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- EN-Revision: 1.6 Maintainer: yannick Status: ready -->
<refentry id="function.time">
<refnamediv>
<refname>time</refname>
<refpurpose>Retourne le timestamp UNIX actuel</refpurpose>
</refnamediv>
<refsect1>
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>time</methodname>
<void/>
</methodsynopsis>
<para>
<function>time</function> retourne l'heure courante, mesurée
en secondes depuis le début de l'époque UNIX, (1er
janvier 1970 00:00:00 GMT).
</para>
<para>
<example>
<title>Exemple avec <function>time</function></title>
<programlisting role="php">
<![CDATA[
<?php
$nextWeek = time() + (7 * 24 * 60 * 60);
// 7 jours; 24 heures; 60 minutes; 60secondes
echo 'Aujourd\'hui : '. date('Y-m-d') ."\n";
echo 'Semaine prochaine : '. date('Y-m-d', $nextWeek) ."\n";
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
Aujourd'hui : 2005-03-30
Semaine prochaine : 2005-04-07
]]>
</screen>
</example>
</para>
<para>
Voir aussi
<function>date</function> et
<function>microtime</function>.
</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:"../../../../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
-->