cvs: phpdoc-sk /reference/datetime/functions strtotime.xml time.xml

From: Date: Fri, 18 Jul 2003 23:48:54 +0000
Subject: cvs: phpdoc-sk /reference/datetime/functions strtotime.xml time.xml
Groups: php.doc.sk 
Request: Send a blank email to doc-sk+get-245@lists.php.net to get a copy of this message
joseph Fri Jul 18 19:48:54 2003 EDT Added files: /phpdoc-sk/reference/datetime/functions strtotime.xml time.xml Log: another datetime function Index: phpdoc-sk/reference/datetime/functions/strtotime.xml +++ phpdoc-sk/reference/datetime/functions/strtotime.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.3 Maintainer: joseph Status: ready --> <!-- splitted from ./en/functions/datetime.xml, last change in rev 1.8 --> <refentry id="function.strtotime"> <refnamediv> <refname>strtotime</refname> <refpurpose> Premeni» akýkoµvek anglický textový popis èasu a dátumu na UNIXový timestamp </refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>int</type><methodname>strtotime</methodname> <methodparam><type>string</type><parameter>time</parameter></methodparam> <methodparam choice="opt"><type>int</type><parameter>now</parameter></methodparam> </methodsynopsis> <simpara> Funkcia oèakáva zadanie re»azca, ktorý obsahuje anglický formát dátumu a pokúsi sa tento formát 'preparsova»' na UNIXový timestamp porovnateµný s timestampom daným v <parameter>now</parameter>, alebo aktuálny èas, ak sa nezadá niè. Pri chybe je vrátená <literal>-1</literal>. </simpara> <simpara> Preto¾e sa <function>strtotime</function> správa podµa GNU syntaxu dátumu, pozrite sa na manuálovú stránku GNU s názvom <ulink url="&url.gnu.man.date-input;">Vstupné formáty dátumu</ulink>. Tam nájdete popísaný platný syntax pre parameter <parameter>time</parameter>. </simpara> <para> <example> <title><function>strtotime</function> príklady</title> <programlisting role="php"> <![CDATA[ <?php echo strtotime ("now"), "\n"; echo strtotime ("10 September 2000"), "\n"; echo strtotime ("+1 day"), "\n"; echo strtotime ("+1 week"), "\n"; echo strtotime ("+1 week 2 days 4 hours 2 seconds"), "\n"; echo strtotime ("next Thursday"), "\n"; echo strtotime ("last Monday"), "\n"; ?> ]]> </programlisting> </example> </para> <para> <example> <title>Zis»ovanie chyby</title> <programlisting role="php"> <![CDATA[ <?php $str = 'Not Good'; if (($timestamp = strtotime($str)) === -1) { echo "Retazec ($str) je bogus"; } else { echo "$str == ". date('l dS of F Y h:i:s A',$timestamp); } ?> ]]> </programlisting> </example> </para> <note> <para> Platný rozsah timestampu je typicky od Fri, 13 Dec 1901 20:45:54 GMT do Tue, 19 Jan 2038 03:14:07 GMT. (Sú to dátumy, ktoré zodpovedajú minimálnym a maximálnym hodnotám pre 32-bitový signed integer.) </para> </note> </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 --> Index: phpdoc-sk/reference/datetime/functions/time.xml +++ phpdoc-sk/reference/datetime/functions/time.xml <?xml version="1.0" encoding="iso-8859-2"?> <!-- EN-Revision: 1.2 Maintainer: joseph Status: ready --> <!-- splitted from ./en/functions/datetime.xml, last change in rev 1.2 --> <refentry id="function.time"> <refnamediv> <refname>time</refname> <refpurpose>Vráti» aktuálny UNIXový timestamp</refpurpose> </refnamediv> <refsect1> <title>Popis</title> <methodsynopsis> <type>int</type><methodname>time</methodname> <void/> </methodsynopsis> <para> Vracia aktuálny èas meraný v poète sekúnd od Unixovej Epochy (1. Január 1970 00:00:00 GMT). </para> <para> Tie¾ pozri <function>date</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 -->

« previous php.doc.sk (#245) next »