File: 272.htm

package info (click to toggle)
eagle 4.16-5
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k
  • size: 36,508 kB
  • sloc: sh: 82; makefile: 32
file content (61 lines) | stat: -rw-r--r-- 1,638 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<html>
<head>
<title>EAGLE Help: Time Conversions</title>
</head>
<body bgcolor=white>
<font face=Helvetica,Arial>
<hr>
<i>EAGLE Help</i>
<h1><center>Time Conversions</center></h1>
<hr>
<dl>
<dt>
<b>Function</b>
<dd>
Convert a time value to day, month, year etc.
<p>
<dt>
<b>Syntax</b>
<dd>
<tt>int t2day(int t);</tt><br>
<tt>int t2dayofweek(int t);</tt><br>
<tt>int t2hour(int t);</tt><br>
<tt>int t2minute(int t);</tt><br>
<tt>int t2month(int t);</tt><br>
<tt>int t2second(int t);</tt><br>
<tt>int t2year(int t);</tt><br>
<br>
<tt>string t2string(int t);</tt>
<p>
<dt>
<b>Returns</b>
<dd>
<tt>t2day      </tt> returns the day of the month (<tt>1</tt>..<tt>31</tt>)<br>
<tt>t2dayofweek</tt> returns the day of the week (<tt>0</tt>=sunday..<tt>6</tt>)<br>
<tt>t2hour     </tt> returns the hour (<tt>0</tt>..<tt>23</tt>)<br>
<tt>t2minute   </tt> returns the minute (<tt>0</tt>..<tt>59</tt>)<br>
<tt>t2month    </tt> returns the month (<tt>0</tt>..<tt>11</tt>)<br>
<tt>t2second   </tt> returns the second (<tt>0</tt>..<tt>59</tt>)<br>
<tt>t2year     </tt> returns the year (including century!)
<tt>t2string   </tt> returns a formatted string containing date and time
<p>
</dl>
<b>See also</b> <a href=271.htm>time</a>
<p>
<b>Example</b>
<pre>
int t = time();
printf("It is now %02d:%02d:%02d\n",
       t2hour(t), t2minute(t), t2second(t));
</pre>

<hr>
<table width=100% cellspacing=0 border=0><tr><td align=left><font face=Helvetica,Arial>
<a href=index.htm>Index</a>
</font></td><td align=right><font face=Helvetica,Arial size=-1>
<i>Copyright &copy; 2005 CadSoft Computer GmbH</i>
</font></td></tr></table>
<hr>
</font>
</body>
</html>