Year.xml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
  4. <sect1 id="Year">
  5. <title>Year</title>
  6. <para><emphasis role="bold">STD.Date.Year<indexterm>
  7. <primary>STD.Date.Year</primary>
  8. </indexterm><indexterm>
  9. <primary>Date.Year</primary>
  10. </indexterm>(</emphasis> <emphasis>date</emphasis> <emphasis
  11. role="bold">)</emphasis></para>
  12. <informaltable colsep="0" frame="none" rowsep="0">
  13. <tgroup cols="2">
  14. <colspec colwidth="80.50pt" />
  15. <colspec />
  16. <tbody>
  17. <row>
  18. <entry><emphasis>date</emphasis></entry>
  19. <entry>A date value in the Date_t format.</entry>
  20. </row>
  21. <row>
  22. <entry>Return:</entry>
  23. <entry>Year returns an INTEGER value.</entry>
  24. </row>
  25. </tbody>
  26. </tgroup>
  27. </informaltable>
  28. <para>The <emphasis role="bold">Year</emphasis> function returns the Year
  29. number from the <emphasis>date</emphasis> value.</para>
  30. <para>Example:</para>
  31. <programlisting format="linespecific">IMPORT STD;
  32. UNSIGNED4 MyDate := 20120101; //January 1, 2012
  33. Y := STD.Date.Year(MyDate);
  34. //Y contains 2012
  35. </programlisting>
  36. <para></para>
  37. </sect1>