DateDataTypes.xml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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="Date_Data_Types">
  5. <title><emphasis role="bold">Date Data Types</emphasis></title>
  6. <para><emphasis role="bold">STD.Date.Date_rec<indexterm>
  7. <primary>STD.Date.Date_rec</primary>
  8. </indexterm><indexterm>
  9. <primary>Date.Date_rec</primary>
  10. </indexterm></emphasis></para>
  11. <para><emphasis role="bold">STD.Date.Date_t<indexterm>
  12. <primary>STD.Date.Date_t</primary>
  13. </indexterm><indexterm>
  14. <primary>Date.Date_t</primary>
  15. </indexterm></emphasis></para>
  16. <para><emphasis role="bold">STD.Date.Days_t<indexterm>
  17. <primary>STD.Date.Days_t</primary>
  18. </indexterm><indexterm>
  19. <primary>Date.Days_t</primary>
  20. </indexterm></emphasis></para>
  21. <informaltable colsep="0" frame="none" rowsep="0">
  22. <tgroup cols="2">
  23. <colspec colwidth="80.50pt" />
  24. <colspec />
  25. <tbody>
  26. <row>
  27. <entry><emphasis role="bold">Date_rec</emphasis></entry>
  28. <entry>A RECORD structure containing three fields, and INTEGER2
  29. year, an UNSIGNED1 month, and an UNSIGNED1 day.</entry>
  30. </row>
  31. <row>
  32. <entry><emphasis role="bold">Date_t</emphasis></entry>
  33. <entry>An UNSIGNED4 containing a date value in YYYYMMDD
  34. format.</entry>
  35. </row>
  36. <row>
  37. <entry><emphasis role="bold">Days_t</emphasis></entry>
  38. <entry>An UNSIGNED4 containing a date value representing the number
  39. of elapsed days since a particular base date. This number can be the
  40. number of days in the common era (January 1, 1AD = 1) based on
  41. either the Julian or Gregorian calendars, or the number of elapsed
  42. days since the Gregorian calendar's January 1, 1900 (January 1, 1900
  43. = 1).</entry>
  44. </row>
  45. </tbody>
  46. </tgroup>
  47. </informaltable>
  48. <para>The three Date data types defined in the Date Standard Library
  49. are:</para>
  50. <programlisting format="linespecific"> // A record stucture with the different elements separated out.
  51. EXPORT Date_rec := RECORD
  52. INTEGER2 year;
  53. UNSIGNED1 month;
  54. UNSIGNED1 day;
  55. END;
  56. //An unsigned number holding a date in the decimal form YYYYMMDD.
  57. //This type does not support dates prior to 1AD
  58. EXPORT Date_t := UNSIGNED4;
  59. //A number of elapsed days. Value depends on the function called.
  60. EXPORT Days_t := UNSIGNED4;
  61. </programlisting>
  62. </sect1>