62793066cfe238e51fb41442b0609faa18e9c18f
[scilab.git] / scilab / modules / time / help / pt_BR / getdate.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) INRIA -
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="getdate" xml:lang="pt">
17     <refnamediv>
18         <refname>getdate</refname>
19         <refpurpose>retorna informação sobre data e hora</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>Seqüência de Chamamento</title>
23         <synopsis>dt=getdate()
24             x=getdate("s")
25             dt=getdate(x)
26         </synopsis>
27     </refsynopsisdiv>
28     <refsection>
29         <title>Parâmetros</title>
30         <variablelist>
31             <varlistentry>
32                 <term>dt</term>
33                 <listitem>
34                     <para>um vetor de inteiros com 10 entradas (ver abaixo) </para>
35                 </listitem>
36             </varlistentry>
37             <varlistentry>
38                 <term>x</term>
39                 <listitem>
40                     <para>um inteiro contendo uma data codificada em segundos a partir
41                         de 01/01/1970
42                     </para>
43                 </listitem>
44             </varlistentry>
45         </variablelist>
46     </refsection>
47     <refsection>
48         <title>Descrição</title>
49         <variablelist>
50             <varlistentry>
51                 <term>dt=getdate()</term>
52                 <listitem>
53                     <para>retorna a dada corrente no formato dado abaixo:</para>
54                     <variablelist>
55                         <varlistentry>
56                             <term>dt(1)</term>
57                             <listitem>
58                                 <para>o ano como um número (com o século) entre 0000 e 9999.
59                                 </para>
60                             </listitem>
61                         </varlistentry>
62                         <varlistentry>
63                             <term>dt(2)</term>
64                             <listitem>
65                                 <para>o mês do ano como um número entre 01 e 12. </para>
66                             </listitem>
67                         </varlistentry>
68                         <varlistentry>
69                             <term>dt(3)</term>
70                             <listitem>
71                                 <para>o número da semana ISO 8601 como um número entre 01 e
72                                     53.
73                                 </para>
74                             </listitem>
75                         </varlistentry>
76                         <varlistentry>
77                             <term>dt(4)</term>
78                             <listitem>
79                                 <para>o dia Juliano do ano como um número entre 001 e 366.
80                                 </para>
81                             </listitem>
82                         </varlistentry>
83                         <varlistentry>
84                             <term>dt(5)</term>
85                             <listitem>
86                                 <para>especifica o dia da semana como um número decimal entre
87                                     1 e 7 , com 1 representando domingo.
88                                 </para>
89                             </listitem>
90                         </varlistentry>
91                         <varlistentry>
92                             <term>dt(6)</term>
93                             <listitem>
94                                 <para>o dia do mês como um número entre 01 e 31. </para>
95                             </listitem>
96                         </varlistentry>
97                         <varlistentry>
98                             <term>dt(7)</term>
99                             <listitem>
100                                 <para>a hora do dia como um número entre 00 e 23. </para>
101                             </listitem>
102                         </varlistentry>
103                         <varlistentry>
104                             <term>dt(8)</term>
105                             <listitem>
106                                 <para>o minuto da hora como um número entre 00 e 59. </para>
107                             </listitem>
108                         </varlistentry>
109                         <varlistentry>
110                             <term>dt(9)</term>
111                             <listitem>
112                                 <para>o segundo do minuto como um número entre 00 e 59.</para>
113                             </listitem>
114                         </varlistentry>
115                         <varlistentry>
116                             <term>dt(10)</term>
117                             <listitem>
118                                 <para>o milissegundo do segundo como um número entre 000 e
119                                     999.
120                                 </para>
121                             </listitem>
122                         </varlistentry>
123                     </variablelist>
124                 </listitem>
125             </varlistentry>
126             <varlistentry>
127                 <term>x=getdate("s")</term>
128                 <listitem>
129                     <para>retorna um escalar com o número de segundos desde 01/01/1970,
130                         00:00 UTC (Convenção de Tempo Unix)
131                     </para>
132                 </listitem>
133             </varlistentry>
134             <varlistentry>
135                 <term>dt=getdate(x)</term>
136                 <listitem>
137                     <para>põe a data dada por x (número de segundos desde 01/01/1970,
138                         00:00 UTC) no formato acima. Neste caso, dt(10) é sempre igual a
139                         0.
140                     </para>
141                 </listitem>
142             </varlistentry>
143         </variablelist>
144     </refsection>
145     <refsection>
146         <title>Exemplos</title>
147         <programlisting role="example"><![CDATA[
148 w=getdate()
149 mprintf("Ano:%d,Mês:%d,Dia:%d",w(1),w(2),w(6));
150
151 x=getdate("s")
152 getdate(x)
153  ]]></programlisting>
154     </refsection>
155     <refsection role="see also">
156         <title>Ver Também</title>
157         <simplelist type="inline">
158             <member>
159                 <link linkend="date">date</link>
160             </member>
161             <member>
162                 <link linkend="timer">timer</link>
163             </member>
164         </simplelist>
165     </refsection>
166 </refentry>