| 1 | |
| 2 | <refentry id="dates"> |
| 3 | <indexterm id="IndexDates"><primary>dates</primary></indexterm> |
| 4 | <refentryinfo><title>Instrument Control:Time Reading</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>dates</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>dates</refname> |
| 11 | <refpurpose> |
| 12 | Returns as a string the date and time specified. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para>Plugin opcode in cs_date.</para> |
| 19 | <para> |
| 20 | Returns as a string the date and time specified. |
| 21 | </para> |
| 22 | </refsect1> |
| 23 | |
| 24 | <refsect1> |
| 25 | <title>Syntax</title> |
| 26 | <synopsis>Sir <command>dates</command> [ itime]</synopsis> |
| 27 | </refsect1> |
| 28 | |
| 29 | <refsect1> |
| 30 | <title>Initialization</title> |
| 31 | |
| 32 | <para> |
| 33 | <emphasis>itime</emphasis> -- the time is seconds since the |
| 34 | start of the epoch. If omited or negative the current time is |
| 35 | taken. |
| 36 | </para> |
| 37 | <para> |
| 38 | <emphasis>Sir</emphasis> -- the date and time as a string. |
| 39 | </para> |
| 40 | </refsect1> |
| 41 | |
| 42 | <refsect1> |
| 43 | <title>Examples</title> |
| 44 | <para> |
| 45 | Here is an example of the dates opcode. It uses the file <ulink url="examples/dates.csd"><citetitle>dates.csd</citetitle></ulink>. |
| 46 | |
| 47 | <example> |
| 48 | <title>Example of the dates opcode.</title> |
| 49 | <xi:include href="examples-xml/dates.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 50 | </example> |
| 51 | |
| 52 | Its output should include lines like this: |
| 53 | <screen> |
| 54 | File '2011_Jan_05_19_14_46.wav' written to the same directory as this CSD file is! |
| 55 | Closing file '/home/user/csound/Output/2011_Jan_05_19_14_46.wav'... |
| 56 | </screen> |
| 57 | </para> |
| 58 | </refsect1> |
| 59 | |
| 60 | <refsect1> |
| 61 | <title>See also</title> |
| 62 | <para><link linkend="ControlTimeread"><citetitle>Time Reading</citetitle></link></para> |
| 63 | </refsect1> |
| 64 | |
| 65 | <refsect1> |
| 66 | <title>Credits</title> |
| 67 | <para> |
| 68 | <simplelist> |
| 69 | <member>Author: &namejohn;</member> |
| 70 | <member>University of Bath/Codemist Ltd.</member> |
| 71 | <member>Bath, UK</member> |
| 72 | <member>December 2006</member> |
| 73 | </simplelist> |
| 74 | </para> |
| 75 | |
| 76 | <para>New in Csound version 5.05</para> |
| 77 | </refsect1> |
| 78 | </refentry> |