Zend_Date-Overview.xml 66 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- EN-Revision: 24249 -->
  3. <!-- Reviewed: no -->
  4. <sect1 id="zend.date.overview">
  5. <title>Zend_Date API Overview</title>
  6. <para>
  7. While the
  8. <classname>Zend_Date</classname>
  9. <acronym>API</acronym>
  10. remains simplistic and unitary, its design remains flexible and
  11. powerful through the rich
  12. permutations of operations and operands.
  13. </para>
  14. <sect2 id="zend.date.options">
  15. <title>Zend_Date Options</title>
  16. <sect3 id="zend.date.options.formattype">
  17. <title>Selecting the Date Format Type</title>
  18. <para>
  19. Several methods use date format strings, in a way similar to
  20. <acronym>PHP</acronym>
  21. 's
  22. <methodname>date()</methodname>
  23. . If you are more
  24. comfortable with
  25. <acronym>PHP</acronym>
  26. 's date format specifier than with
  27. <acronym>ISO</acronym>
  28. format specifiers, then you can use
  29. <methodname>Zend_Date::setOptions(array('format_type' => 'php'))</methodname>
  30. .
  31. Afterward, use
  32. <acronym>PHP</acronym>
  33. 's date format specifiers for all functions
  34. which accept a
  35. <varname>$format</varname>
  36. parameter. Use
  37. <methodname>Zend_Date::setOptions(array('format_type' => 'iso'))</methodname>
  38. to
  39. switch back to the default mode of supporting only
  40. <acronym>ISO</acronym>
  41. date
  42. format tokens. For a list of supported format codes, see
  43. <link linkend="zend.date.constants.phpformats">Self-Defined OUTPUT Formats Using PHP's
  44. date() Format Specifiers</link>
  45. </para>
  46. </sect3>
  47. <sect3 id="zend.date.options.fixdst">
  48. <title>DST and Date Math</title>
  49. <para>
  50. When dates are manipulated, sometimes they cross over a
  51. <acronym>DST</acronym>
  52. change, normally resulting in the date losing or gaining an hour. For exmaple, when
  53. adding months to a date before a
  54. <acronym>DST</acronym>
  55. change, if the resulting
  56. date is after the
  57. <acronym>DST</acronym>
  58. change, then the resulting date will appear
  59. to lose or gain an hour, resulting in the
  60. time value of the date changing. For
  61. boundary dates, such as midnight of the first or
  62. last day of a month, adding enough
  63. months to cross a date boundary results in the
  64. date losing an hour and becoming the
  65. last hour of the preceding month, giving the
  66. appearance of an "off by 1" error. To
  67. avoid this situation, the
  68. <acronym>DST</acronym>
  69. change ignored by using the
  70. <property>fix_dst</property>
  71. option. When crossing the Summer or Winter
  72. <acronym>DST</acronym>
  73. boundary, normally an hour is substracted or added
  74. depending on the date. For
  75. example, date math crossing the Spring
  76. <acronym>DST</acronym>
  77. leads to a date having a day value one less than
  78. expected, if the time part of the
  79. date was originally 00:00:00. Since
  80. <classname>Zend_Date</classname>
  81. is based on timestamps, and not calendar dates
  82. with a time component, the timestamp
  83. loses an hour, resulting in the date having a
  84. calendar day value one less than
  85. expected. To prevent such problems use the option
  86. <property>fix_dst</property>
  87. , which defaults to
  88. <constant>TRUE</constant>
  89. ,
  90. causing
  91. <acronym>DST</acronym>
  92. to have no effect on date "math"
  93. (
  94. <methodname>addMonth()</methodname>
  95. ,
  96. <methodname>subMonth()</methodname>
  97. ). Use
  98. <methodname>Zend_Date::setOptions(array('fix_dst' => false))</methodname>
  99. to
  100. enable the subtraction or addition of the
  101. <acronym>DST</acronym>
  102. adjustment when
  103. performing date "math".
  104. </para>
  105. <para>
  106. <emphasis>
  107. If your actual timezone within the instance of
  108. <classname>Zend_Date</classname>
  109. is set to
  110. <acronym>UTC</acronym>
  111. or
  112. <acronym>GMT</acronym>
  113. the option '
  114. <property>fix_dst</property>
  115. ' will not be
  116. used
  117. </emphasis>
  118. because these two timezones do not work with
  119. <acronym>DST</acronym>
  120. . When you change the timezone for this instance again to
  121. a timezone which is not
  122. <acronym>UTC</acronym>
  123. or
  124. <acronym>GMT</acronym>
  125. the
  126. previous set 'fix_dst' option will be used again for date "math".
  127. </para>
  128. </sect3>
  129. <sect3 id="zend.date.options.extendmonth">
  130. <title>Month Calculations</title>
  131. <para>
  132. When adding or substracting months from an existing date, the resulting value for
  133. the day of the month might be unexpected, if the original date fell on a day close
  134. to the end of the month. For example, when adding one month to January 31st, people
  135. familiar with
  136. <acronym>SQL</acronym>
  137. will expect February 28th as the result. On the
  138. other side, people familiar with
  139. Excel and OpenOffice will expect March 3rd as the
  140. result. The problem only occurs, if
  141. the resulting month does not have the day, which
  142. is set in the original date. For
  143. Zend Framework developers, the desired behavior is
  144. selectable using the
  145. <property>extend_month</property>
  146. option to choose either the
  147. <acronym>SQL</acronym>
  148. behaviour, if set to
  149. <constant>FALSE</constant>
  150. , or the
  151. spreadsheet behaviour when set to
  152. <constant>TRUE</constant>
  153. . The default behaviour
  154. for
  155. <property>extend_month</property>
  156. is
  157. <constant>FALSE</constant>
  158. , providing
  159. behavior compatible to
  160. <acronym>SQL</acronym>
  161. . By default,
  162. <classname>Zend_Date</classname>
  163. computes month calculations by truncating dates
  164. to the end of the month (if
  165. necessary), without wrapping into the next month when
  166. the original date designates a
  167. day of the month exceeding the number of days in the
  168. resulting month. Use
  169. <methodname>Zend_Date::setOptions(array('extend_month' =>
  170. true))</methodname>
  171. to make month calculations work like popular spreadsheet
  172. programs.
  173. </para>
  174. </sect3>
  175. <sect3 id="zend.date.options.cache">
  176. <title>Speed up Date Localization and Normalization with Zend_Cache</title>
  177. <para>
  178. You can speed up
  179. <classname>Zend_Date</classname>
  180. by using an
  181. <classname>Zend_Cache</classname>
  182. adapter. This speeds up all methods of
  183. <classname>Zend_Date</classname>
  184. when you are using localized data. For example
  185. all methods which accept
  186. <constant>Zend_Date::DATE</constant>
  187. and
  188. <constant>Zend_Date::TIME</constant>
  189. constants would benefit from this. To set
  190. an
  191. <classname>Zend_Cache</classname>
  192. adapter to
  193. <classname>Zend_Date</classname>
  194. just use
  195. <methodname>Zend_Date::setOptions(array('cache' => $adapter))</methodname>
  196. .
  197. </para>
  198. </sect3>
  199. <sect3 id="zend.date.options.timesync">
  200. <title>Receiving Syncronised Timestamps with Zend_TimeSync</title>
  201. <para>
  202. Normally the clocks from servers and computers differ from each other.
  203. <classname>Zend_Date</classname>
  204. is able to handle such problems with the help
  205. of
  206. <classname>Zend_TimeSync</classname>
  207. . You can set a timeserver with
  208. <methodname>Zend_Date::setOptions(array('timesync' => $timeserver))</methodname>
  209. which will set the offset between the own actual timestamp and the real actual
  210. timestamp for all instances of
  211. <classname>Zend_Date</classname>
  212. . Using this option
  213. does not change the timestamp of existing instances. So best
  214. usage is to set it
  215. within the bootstrap file.
  216. </para>
  217. </sect3>
  218. </sect2>
  219. <sect2 id="zend.date.values">
  220. <title>Working with Date Values</title>
  221. <para>
  222. Once input has been normalized via the creation of a
  223. <classname>Zend_Date</classname>
  224. object, it will have an associated timezone, but an internal representation using
  225. standard
  226. <ulink url="http://en.wikipedia.org/wiki/Unix_Time">UNIX timestamps</ulink>
  227. . In
  228. order for a date to be rendered in a localized manner, a timezone must be known
  229. first.
  230. The default timezone is always
  231. <acronym>GMT</acronym>
  232. or
  233. <acronym>UTC</acronym>
  234. . To
  235. examine an object's timezone use
  236. <methodname>getTimeZone()</methodname>
  237. . To change an
  238. object's timezone, use
  239. <methodname>setTimeZone()</methodname>
  240. . All manipulations of
  241. these objects are assumed to be relative to this timezone.
  242. </para>
  243. <para>
  244. Beware of mixing and matching operations with date parts between date objects for
  245. different timezones, which generally produce undesireable results, unless the
  246. manipulations are only related to the timestamp. Operating on
  247. <classname>Zend_Date</classname>
  248. objects having different timezones generally works,
  249. except as just noted, since dates are
  250. normalized to
  251. <acronym>UNIX</acronym>
  252. timestamps
  253. on instantiation of
  254. <classname>Zend_Date</classname>
  255. .
  256. </para>
  257. <para>
  258. Most methods expect a constant selecting the desired
  259. <varname>$part</varname>
  260. of a
  261. date, such as
  262. <constant>Zend_Date::HOUR</constant>
  263. . These constants are valid for all of
  264. the functions below. A list of all available
  265. constants is provided in
  266. <link linkend="zend.date.constants.list">list of all constants</link>
  267. . If no
  268. <varname>$part</varname>
  269. is specified, then
  270. <constant>Zend_Date::TIMESTAMP</constant>
  271. is assumed. Alternatively, a
  272. user-specified format may be used for
  273. <varname>$part</varname>
  274. , using the same
  275. underlying mechanism and format codes as
  276. <link linkend="zend.locale.date.normalize">
  277. <methodname>Zend_Locale_Format::getDate()</methodname>
  278. </link>
  279. . If a date object is constructed using an obviously invalid date (e.g. a month
  280. number
  281. greater than 12), then
  282. <classname>Zend_Date</classname>
  283. will throw an exception,
  284. unless no specific date format has been selected -i.e.
  285. <varname>$part</varname>
  286. is
  287. either
  288. <constant>NULL</constant>
  289. or
  290. <constant>Zend_Date::DATES</constant>
  291. (a "loose"
  292. format).
  293. </para>
  294. <example id="zend.date.values.example-1">
  295. <title>User-Specified Input Date Format</title>
  296. <programlisting language="php"><![CDATA[
  297. $date1 = new Zend_Date('Feb 31, 2007', null, 'en_US');
  298. echo $date1, "\n"; // outputs "Mar 3, 2007 12:00:00 AM"
  299. $date2 = new Zend_Date('Feb 31, 2007', Zend_Date::DATES, 'en_US');
  300. echo $date2, "\n"; // outputs "Mar 3, 2007 12:00:00 AM"
  301. // strictly restricts interpretation to specified format
  302. $date3 = new Zend_Date('Feb 31, 2007', 'MM.dd.yyyy');
  303. echo $date3, "\n"; // outputs "Mar 3, 2007 12:00:00 AM"
  304. ]]></programlisting>
  305. </example>
  306. <para>
  307. If the optional
  308. <varname>$locale</varname>
  309. parameter is provided, then the
  310. <varname>$locale</varname>
  311. disambiguates the
  312. <varname>$date</varname>
  313. operand by
  314. replacing month and weekday names for string
  315. <varname>$date</varname>
  316. operands, and even
  317. parsing date strings expressed according to the conventions of that
  318. locale (see
  319. <link linkend="zend.locale.date.normalize">Zend_Locale_Format::getDate()</link>
  320. ). The
  321. automatic normalization of localized
  322. <varname>$date</varname>
  323. operands of a string type
  324. occurs when
  325. <varname>$part</varname>
  326. is one of the
  327. <constant>Zend_Date::DATE</constant>
  328. *
  329. or
  330. <constant>Zend_Date::TIME</constant>
  331. * constants. The locale identifies which language
  332. should be used to parse month names and
  333. weekday names, if the
  334. <varname>$date</varname>
  335. is a string containing a date. If there is no
  336. <varname>$date</varname>
  337. input parameter,
  338. then the
  339. <varname>$locale</varname>
  340. parameter specifies the locale to use for localizing
  341. output (e.g. the date format for a
  342. string representation). Note that the
  343. <varname>$date</varname>
  344. input parameter might actually have a type name instead
  345. (e.g.
  346. <varname>$hour</varname>
  347. for
  348. <methodname>addHour()</methodname>
  349. ), although that
  350. does not prevent the use of
  351. <classname>Zend_Date</classname>
  352. objects as arguments for
  353. that parameter. If no
  354. <varname>$locale</varname>
  355. was specified, then the locale of the
  356. current object is used to interpret
  357. <varname>$date</varname>
  358. , or select the localized
  359. format for output.
  360. </para>
  361. <para>
  362. Since Zend Framework 1.7.0
  363. <classname>Zend_Date</classname>
  364. does also support the
  365. usage of an application wide locale. You can simply set a
  366. <classname>Zend_Locale</classname>
  367. instance to the registry like shown below. With
  368. this notation you can forget about
  369. setting the locale manually with each instance when
  370. you want to use the same locale
  371. multiple times.
  372. </para>
  373. <programlisting language="php"><![CDATA[
  374. // in your bootstrap file
  375. $locale = new Zend_Locale('de_AT');
  376. Zend_Registry::set('Zend_Locale', $locale);
  377. // somewhere in your application
  378. $date = new Zend_Date('31.Feb.2007');
  379. ]]></programlisting>
  380. </sect2>
  381. <sect2 id="id.date.basic">
  382. <title>Basic Zend_Date Operations Common to Many Date Parts</title>
  383. <para>
  384. The methods
  385. <methodname>add()</methodname>
  386. ,
  387. <methodname>sub()</methodname>
  388. ,
  389. <methodname>compare()</methodname>
  390. ,
  391. <methodname>get()</methodname>
  392. , and
  393. <methodname>set()</methodname>
  394. operate generically on dates. In each case, the
  395. operation is performed on the date held
  396. in the instance object. The
  397. <varname>$date</varname>
  398. operand is required for all of these methods, except
  399. <methodname>get()</methodname>
  400. , and may be a
  401. <classname>Zend_Date</classname>
  402. instance object, a numeric string, or an integer. These methods assume
  403. <varname>$date</varname>
  404. is a timestamp, if it is not an object. However, the
  405. <varname>$part</varname>
  406. operand controls which logical part of the two dates are
  407. operated on, allowing operations
  408. on parts of the object's date, such as year or minute,
  409. even when
  410. <varname>$date</varname>
  411. contains a long form date string, such as, "December
  412. 31, 2007 23:59:59". The result of
  413. the operation changes the date in the object, except
  414. for
  415. <methodname>compare()</methodname>
  416. , and
  417. <methodname>get()</methodname>
  418. .
  419. </para>
  420. <example id="zend.date.basic.example-1">
  421. <title>Operating on Parts of Dates</title>
  422. <programlisting language="php"><![CDATA[
  423. $date = new Zend_Date(); // $date's timestamp === time()
  424. // changes $date by adding 12 hours
  425. $date->add('12', Zend_Date::HOUR);
  426. print $date;
  427. ]]></programlisting>
  428. </example>
  429. <para>
  430. Convenience methods exist for each combination of the basic operations and several
  431. common date parts as shown in the tables below. These convenience methods help us lazy
  432. programmers avoid having to type out the
  433. <link linkend="zend.date.constants.list">date
  434. part constants</link>
  435. when using the general methods above. Conveniently, they are
  436. named by combining a prefix
  437. (name of a basic operation) with a suffix (type of date
  438. part), such as
  439. <methodname>addYear()</methodname>
  440. . In the list below, all combinations
  441. of "Date Parts" and "Basic Operations" exist. For
  442. example, the operation "add" exists
  443. for each of these date parts, including
  444. <methodname>addDay()</methodname>
  445. ,
  446. <methodname>addYear()</methodname>
  447. , etc.
  448. </para>
  449. <para>
  450. These convenience methods have the same equivalent functionality as the basic
  451. operation
  452. methods, but expect string and integer
  453. <varname>$date</varname>
  454. operands
  455. containing only the values representing the type indicated by the suffix of the
  456. convenience method. Thus, the names of these methods (e.g. "Year" or "Minute") identify
  457. the units of the
  458. <varname>$date</varname>
  459. operand, when
  460. <varname>$date</varname>
  461. is a
  462. string or integer.
  463. </para>
  464. <sect3 id="id.date.basic.parts">
  465. <title>List of Date Parts</title>
  466. <table id="id.date.basic.parts.table">
  467. <title>Date Parts</title>
  468. <tgroup cols="2">
  469. <thead>
  470. <row>
  471. <entry>Date Part</entry>
  472. <entry>Explanation</entry>
  473. </row>
  474. </thead>
  475. <tbody>
  476. <row>
  477. <entry>
  478. <ulink url="http://en.wikipedia.org/wiki/Unix_Time">Timestamp</ulink>
  479. </entry>
  480. <entry>
  481. UNIX timestamp, expressed in seconds elapsed since January 1st,
  482. 1970
  483. 00:00:00
  484. <acronym>GMT</acronym>
  485. .
  486. </entry>
  487. </row>
  488. <row>
  489. <entry>
  490. <ulink url="http://en.wikipedia.org/wiki/Gregorian_calendar">Year</ulink>
  491. </entry>
  492. <entry>Gregorian calendar year (e.g. 2006)</entry>
  493. </row>
  494. <row>
  495. <entry>
  496. <ulink
  497. url="http://en.wikipedia.org/wiki/Month#Julian_and_Gregorian_calendars"
  498. >Month</ulink>
  499. </entry>
  500. <entry> Gregorian calendar month (1-12, localized names supported)
  501. </entry>
  502. </row>
  503. <row>
  504. <entry>
  505. <ulink url="http://en.wikipedia.org/wiki/24-hour_clock">24 hour
  506. clock</ulink>
  507. </entry>
  508. <entry> Hours of the day (0-23) denote the hours elapsed, since the
  509. start of the day. </entry>
  510. </row>
  511. <row>
  512. <entry>
  513. <ulink url="http://en.wikipedia.org/wiki/Minute">minute</ulink>
  514. </entry>
  515. <entry> Minutes of the hour (0-59) denote minutes elapsed, since the
  516. start of the hour. </entry>
  517. </row>
  518. <row>
  519. <entry>
  520. <ulink url="http://en.wikipedia.org/wiki/Second">Second</ulink>
  521. </entry>
  522. <entry> Seconds of the minute (0-59) denote the elapsed seconds, since
  523. the start of the minute. </entry>
  524. </row>
  525. <row>
  526. <entry>
  527. <ulink url="http://en.wikipedia.org/wiki/Millisecond">millisecond</ulink>
  528. </entry>
  529. <entry>
  530. Milliseconds denote thousandths of a second (0-999).
  531. <classname>Zend_Date</classname>
  532. supports two additional methods
  533. for working with time units smaller
  534. than seconds. By default,
  535. <classname>Zend_Date</classname>
  536. instances use a precision
  537. defaulting to milliseconds, as seen using
  538. <methodname>getFractionalPrecision()</methodname>
  539. . To change the
  540. precision use
  541. <methodname>setFractionalPrecision($precision)</methodname>
  542. .
  543. However, precision is limited practically to microseconds, since
  544. <classname>Zend_Date</classname>
  545. uses
  546. <ulink url="http://php.net/microtime">microtime()</ulink>
  547. .
  548. </entry>
  549. </row>
  550. <row>
  551. <entry>
  552. <ulink url="http://en.wikipedia.org/wiki/Day">Day</ulink>
  553. </entry>
  554. <entry>
  555. <constant>Zend_Date::DAY_SHORT</constant>
  556. is extracted from
  557. <varname>$date</varname>
  558. if the
  559. <varname>$date</varname>
  560. operand
  561. is an instance of
  562. <classname>Zend_Date</classname>
  563. or a numeric
  564. string. Otherwise, an attempt is made to extract the day
  565. according
  566. to the conventions documented for these constants:
  567. <constant>Zend_Date::WEEKDAY_NARROW</constant>
  568. ,
  569. <constant>Zend_Date::WEEKDAY_NAME</constant>
  570. ,
  571. <constant>Zend_Date::WEEKDAY_SHORT</constant>
  572. ,
  573. <constant>Zend_Date::WEEKDAY</constant>
  574. (Gregorian calendar
  575. assumed)
  576. </entry>
  577. </row>
  578. <row>
  579. <entry>
  580. <ulink url="http://en.wikipedia.org/wiki/Week">Week</ulink>
  581. </entry>
  582. <entry>
  583. <constant>Zend_Date::WEEK</constant>
  584. is extracted from
  585. <varname>$date</varname>
  586. if the
  587. <varname>$date</varname>
  588. operand
  589. is an instance of
  590. <classname>Zend_Date</classname>
  591. or a numeric
  592. string. Otherwise an exception is raised. (Gregorian
  593. calendar
  594. assumed)
  595. </entry>
  596. </row>
  597. <row>
  598. <entry>Date</entry>
  599. <entry>
  600. <constant>Zend_Date::DAY_MEDIUM</constant>
  601. is extracted from
  602. <varname>$date</varname>
  603. if the
  604. <varname>$date</varname>
  605. operand
  606. is an instance of
  607. <classname>Zend_Date</classname>
  608. . Otherwise, an
  609. attempt is made to normalize the
  610. <varname>$date</varname>
  611. string
  612. into a
  613. <constant>Zend_Date::DATE_MEDIUM</constant>
  614. formatted date.
  615. The format of
  616. <constant>Zend_Date::DAY_MEDIUM</constant>
  617. depends on
  618. the object's locale.
  619. </entry>
  620. </row>
  621. <row>
  622. <entry>Weekday</entry>
  623. <entry>
  624. Weekdays are represented numerically as 0 (for Sunday) through 6
  625. (for Saturday).
  626. <constant>Zend_Date::WEEKDAY_DIGIT</constant>
  627. is
  628. extracted from
  629. <varname>$date</varname>
  630. , if the
  631. <varname>$date</varname>
  632. operand is an instance of
  633. <classname>Zend_Date</classname>
  634. or a numeric string. Otherwise,
  635. an attempt is made to extract the day
  636. according to the conventions
  637. documented for these constants:
  638. <constant>Zend_Date::WEEKDAY_NARROW</constant>
  639. ,
  640. <constant>Zend_Date::WEEKDAY_NAME</constant>
  641. ,
  642. <constant>Zend_Date::WEEKDAY_SHORT</constant>
  643. ,
  644. <constant>Zend_Date::WEEKDAY</constant>
  645. (Gregorian calendar
  646. assumed)
  647. </entry>
  648. </row>
  649. <row>
  650. <entry>DayOfYear</entry>
  651. <entry>
  652. In
  653. <classname>Zend_Date</classname>
  654. , the day of the year
  655. represents the number of calendar days elapsed
  656. since the start of
  657. the year (0-365). As with other units above,
  658. fractions are rounded
  659. down to the nearest whole number. (Gregorian
  660. calendar assumed)
  661. </entry>
  662. </row>
  663. <row>
  664. <entry>
  665. <ulink url="http://www.faqs.org/rfcs/rfc822.html">Arpa</ulink>
  666. </entry>
  667. <entry>
  668. Arpa dates (i.e.
  669. <acronym>RFC</acronym>
  670. 822 formatted dates) are
  671. supported. Output uses either a "GMT" or
  672. "Local differential
  673. hours+min" format (see section 5 of
  674. <acronym>RFC</acronym>
  675. 822).
  676. Before
  677. <acronym>PHP</acronym>
  678. 5.2.2, using the
  679. <constant>DATE_RFC822</constant>
  680. constant with
  681. <acronym>PHP</acronym>
  682. date functions sometimes produces
  683. <ulink url="http://bugs.php.net/bug.php?id=40308">incorrect
  684. results</ulink>
  685. .
  686. <classname>Zend_Date</classname>
  687. 's results are
  688. correct. Example: Mon, 31 Dec 06 23:59:59
  689. <acronym>GMT</acronym>
  690. </entry>
  691. </row>
  692. <row>
  693. <entry>
  694. <ulink url="http://en.wikipedia.org/wiki/ISO_8601">Iso</ulink>
  695. </entry>
  696. <entry>
  697. Only complete
  698. <acronym>ISO</acronym>
  699. 8601 dates are supported
  700. for output. Example:
  701. 2009-02-14T00:31:30+01:00
  702. </entry>
  703. </row>
  704. </tbody>
  705. </tgroup>
  706. </table>
  707. </sect3>
  708. <sect3 id="id.date.basic.operations">
  709. <title>List of Date Operations</title>
  710. <para>
  711. The basic operations below can be used instead of the convenience operations for
  712. specific date parts, if the
  713. <link linkend="zend.date.constants.list">appropriate
  714. constant</link>
  715. is used for the
  716. <varname>$part</varname>
  717. parameter.
  718. </para>
  719. <table id="id.date.basic.operations.table">
  720. <title>Basic Operations</title>
  721. <tgroup cols="2">
  722. <thead>
  723. <row>
  724. <entry>Basic Operation</entry>
  725. <entry>Explanation</entry>
  726. </row>
  727. </thead>
  728. <tbody>
  729. <row>
  730. <entry>
  731. <methodname>get()</methodname>
  732. </entry>
  733. <entry>
  734. <para>
  735. <emphasis>
  736. <methodname>get($part = null, $locale = null)</methodname>
  737. </emphasis>
  738. </para>
  739. <para>
  740. Use
  741. <methodname>get($part)</methodname>
  742. to retrieve the date
  743. <varname>$part</varname>
  744. of this object's date localized to
  745. <varname>$locale</varname>
  746. as a formatted string or integer.
  747. When using the BCMath
  748. extension, numeric strings might be
  749. returned instead of integers
  750. for large values.
  751. </para>
  752. <note>
  753. <title>Behaviour of get()</title>
  754. <para>
  755. Unlike
  756. <methodname>get()</methodname>
  757. , the other get*()
  758. convenience methods only return instances
  759. of
  760. <classname>Zend_Date</classname>
  761. containing a date
  762. representing the selected or computed date
  763. or time.
  764. </para>
  765. </note>
  766. </entry>
  767. </row>
  768. <row>
  769. <entry>
  770. <methodname>set()</methodname>
  771. </entry>
  772. <entry>
  773. <para>
  774. <emphasis>
  775. <methodname>set($date, $part = null, $locale =
  776. null)</methodname>
  777. </emphasis>
  778. </para>
  779. <para>
  780. Sets the
  781. <varname>$part</varname>
  782. of the current object to the
  783. corresponding value for that part
  784. found in the input
  785. <varname>$date</varname>
  786. having a locale
  787. <varname>$locale</varname>
  788. .
  789. </para>
  790. </entry>
  791. </row>
  792. <row>
  793. <entry>
  794. <methodname>add()</methodname>
  795. </entry>
  796. <entry>
  797. <para>
  798. <emphasis>
  799. <methodname>add($date, $part = null, $locale =
  800. null)</methodname>
  801. </emphasis>
  802. </para>
  803. <para>
  804. Adds the
  805. <varname>$part</varname>
  806. of
  807. <varname>$date</varname>
  808. having a locale
  809. <varname>$locale</varname>
  810. to the current
  811. object's date.
  812. </para>
  813. </entry>
  814. </row>
  815. <row>
  816. <entry>
  817. <methodname>sub()</methodname>
  818. </entry>
  819. <entry>
  820. <para>
  821. <emphasis>
  822. <methodname>sub($date, $part = null, $locale =
  823. null)</methodname>
  824. </emphasis>
  825. </para>
  826. <para>
  827. Subtracts the
  828. <varname>$part</varname>
  829. of
  830. <varname>$date</varname>
  831. having a locale
  832. <varname>$locale</varname>
  833. from the current object's date.
  834. </para>
  835. </entry>
  836. </row>
  837. <row>
  838. <entry>
  839. <methodname>copyPart()</methodname>
  840. </entry>
  841. <entry>
  842. <para>
  843. <emphasis>
  844. <methodname>copyPart($part, $locale = null)</methodname>
  845. </emphasis>
  846. </para>
  847. <para>
  848. Returns a cloned object, with only
  849. <varname>$part</varname>
  850. of
  851. the object's date copied to the clone, with the clone have its
  852. locale arbitrarily set to
  853. <varname>$locale</varname>
  854. (if
  855. specified).
  856. </para>
  857. </entry>
  858. </row>
  859. <row>
  860. <entry>
  861. <methodname>compare()</methodname>
  862. </entry>
  863. <entry>
  864. <para>
  865. <emphasis>
  866. <methodname>compare($date, $part = null, $locale =
  867. null)</methodname>
  868. </emphasis>
  869. </para>
  870. <para>
  871. compares
  872. <varname>$part</varname>
  873. of
  874. <varname>$date</varname>
  875. to this object's timestamp, returning 0 if they are equal, 1 if
  876. this object's part was more recent than
  877. <varname>$date</varname>
  878. 's part, otherwise -1.
  879. </para>
  880. </entry>
  881. </row>
  882. </tbody>
  883. </tgroup>
  884. </table>
  885. </sect3>
  886. </sect2>
  887. <sect2 id="zend.date.others.comparison">
  888. <title>Comparing Dates</title>
  889. <para>
  890. The following basic operations do not have corresponding convenience methods for the
  891. date parts listed in
  892. <link linkend="zend.date.overview">Zend_Date API
  893. Overview</link>
  894. .
  895. </para>
  896. <table id="zend.date.others.comparison.table">
  897. <title>Date Comparison Methods</title>
  898. <tgroup cols="2">
  899. <thead>
  900. <row>
  901. <entry>Method</entry>
  902. <entry>Explanation</entry>
  903. </row>
  904. </thead>
  905. <tbody>
  906. <row>
  907. <entry>
  908. <methodname>equals()</methodname>
  909. </entry>
  910. <entry>
  911. <para>
  912. <emphasis>
  913. <methodname>equals($date, $part = null, $locale =
  914. null)</methodname>
  915. </emphasis>
  916. </para>
  917. <para>
  918. returns
  919. <constant>TRUE</constant>
  920. , if
  921. <varname>$part</varname>
  922. of
  923. <varname>$date</varname>
  924. having locale
  925. <varname>$locale</varname>
  926. is the same as this object's date
  927. <varname>$part</varname>
  928. , otherwise
  929. <constant>FALSE</constant>
  930. </para>
  931. </entry>
  932. </row>
  933. <row>
  934. <entry>
  935. <methodname>isEarlier()</methodname>
  936. </entry>
  937. <entry>
  938. <para>
  939. <emphasis>
  940. <methodname>isEarlier($date, $part = null, $locale =
  941. null)</methodname>
  942. </emphasis>
  943. </para>
  944. <para>
  945. returns
  946. <constant>TRUE</constant>
  947. , if
  948. <varname>$part</varname>
  949. of
  950. this object's date is earlier than
  951. <varname>$part</varname>
  952. of
  953. <varname>$date</varname>
  954. having a locale
  955. <varname>$locale</varname>
  956. </para>
  957. </entry>
  958. </row>
  959. <row>
  960. <entry>
  961. <methodname>isLater()</methodname>
  962. </entry>
  963. <entry>
  964. <para>
  965. <emphasis>
  966. <methodname>isLater($date, $part = null, $locale =
  967. null)</methodname>
  968. </emphasis>
  969. </para>
  970. <para>
  971. returns
  972. <constant>TRUE</constant>
  973. , if
  974. <varname>$part</varname>
  975. of
  976. this object's date is later than
  977. <varname>$part</varname>
  978. of
  979. <varname>$date</varname>
  980. having a locale
  981. <varname>$locale</varname>
  982. </para>
  983. </entry>
  984. </row>
  985. <row>
  986. <entry>
  987. <methodname>isToday()</methodname>
  988. </entry>
  989. <entry>
  990. <para>
  991. <emphasis>
  992. <methodname>isToday()</methodname>
  993. </emphasis>
  994. </para>
  995. <para>Tests if today's year, month, and day match this object's date
  996. value, using this object's timezone.</para>
  997. </entry>
  998. </row>
  999. <row>
  1000. <entry>
  1001. <methodname>isTomorrow()</methodname>
  1002. </entry>
  1003. <entry>
  1004. <para>
  1005. <emphasis>
  1006. <methodname>isTomorrow()</methodname>
  1007. </emphasis>
  1008. </para>
  1009. <para>Tests if tomorrow's year, month, and day match this object's date
  1010. value, using this object's timezone.</para>
  1011. </entry>
  1012. </row>
  1013. <row>
  1014. <entry>
  1015. <methodname>isYesterday()</methodname>
  1016. </entry>
  1017. <entry>
  1018. <para>
  1019. <emphasis>
  1020. <methodname>isYesterday()</methodname>
  1021. </emphasis>
  1022. </para>
  1023. <para>Tests if yesterday's year, month, and day match this object's date
  1024. value, using this object's timezone.</para>
  1025. </entry>
  1026. </row>
  1027. <row>
  1028. <entry>
  1029. <methodname>isLeapYear()</methodname>
  1030. </entry>
  1031. <entry>
  1032. <para>
  1033. <emphasis>
  1034. <methodname>isLeapYear()</methodname>
  1035. </emphasis>
  1036. </para>
  1037. <para>
  1038. Use
  1039. <methodname>isLeapYear()</methodname>
  1040. to determine if the
  1041. current object is a leap year, or use
  1042. <methodname>Zend_Date::checkLeapYear($year)</methodname>
  1043. to
  1044. check
  1045. <varname>$year</varname>
  1046. , which can be a string, integer, or
  1047. instance of
  1048. <classname>Zend_Date</classname>
  1049. . Is the year a leap
  1050. year?
  1051. </para>
  1052. </entry>
  1053. </row>
  1054. <row>
  1055. <entry>
  1056. <methodname>isDate()</methodname>
  1057. </entry>
  1058. <entry>
  1059. <para>
  1060. <emphasis>
  1061. <methodname>isDate($date, $format = null, $locale =
  1062. null)</methodname>
  1063. </emphasis>
  1064. </para>
  1065. <para>
  1066. This method checks if a given date is a real date and returns
  1067. <constant>TRUE</constant>
  1068. if all checks are ok. It works like
  1069. <acronym>PHP</acronym>
  1070. 's
  1071. <methodname>checkdate()</methodname>
  1072. function but can also check for localized month names and for dates
  1073. extending the range of
  1074. <methodname>checkdate()</methodname>
  1075. </para>
  1076. </entry>
  1077. </row>
  1078. </tbody>
  1079. </tgroup>
  1080. </table>
  1081. </sect2>
  1082. <sect2 id="zend.date.others.gettingparts">
  1083. <title>Getting Dates and Date Parts</title>
  1084. <para>
  1085. Several methods support retrieving values related to a
  1086. <classname>Zend_Date</classname>
  1087. instance.
  1088. </para>
  1089. <table id="zend.date.others.gettingparts.table">
  1090. <title>Date Output Methods</title>
  1091. <tgroup cols="2">
  1092. <thead>
  1093. <row>
  1094. <entry>Method</entry>
  1095. <entry>Explanation</entry>
  1096. </row>
  1097. </thead>
  1098. <tbody>
  1099. <row>
  1100. <entry>
  1101. <methodname>toString()</methodname>
  1102. </entry>
  1103. <entry>
  1104. <para>
  1105. <emphasis>
  1106. <methodname>toString($format = null, $locale =
  1107. null)</methodname>
  1108. </emphasis>
  1109. </para>
  1110. <para>
  1111. Invoke directly or via the magic method
  1112. <methodname>__toString()</methodname>
  1113. . The
  1114. <methodname>toString()</methodname>
  1115. method automatically formats
  1116. the date object's value according to the
  1117. conventions of the object's
  1118. locale, or an optionally specified
  1119. <varname>$locale</varname>
  1120. . For a
  1121. list of supported format codes, see
  1122. <link linkend="zend.date.constants.selfdefinedformats">Self-Defined
  1123. OUTPUT Formats with ISO</link>
  1124. .
  1125. </para>
  1126. </entry>
  1127. </row>
  1128. <row>
  1129. <entry>
  1130. <methodname>toArray()</methodname>
  1131. </entry>
  1132. <entry>
  1133. <para>
  1134. <emphasis>
  1135. <methodname>toArray()</methodname>
  1136. </emphasis>
  1137. </para>
  1138. <para>
  1139. Returns an array representation of the selected date according to
  1140. the conventions of the object's locale. The returned array is
  1141. equivalent to
  1142. <acronym>PHP</acronym>
  1143. 's
  1144. <ulink url="http://php.net/getdate">getdate()</ulink>
  1145. function and
  1146. includes:
  1147. </para>
  1148. <itemizedlist>
  1149. <listitem>
  1150. <para>
  1151. Number of day as '
  1152. <emphasis>day</emphasis>
  1153. '
  1154. (
  1155. <constant>Zend_Date::DAY_SHORT</constant>
  1156. )
  1157. </para>
  1158. </listitem>
  1159. <listitem>
  1160. <para>
  1161. Number of month as '
  1162. <emphasis>month</emphasis>
  1163. '
  1164. (
  1165. <constant>Zend_Date::MONTH_SHORT</constant>
  1166. )
  1167. </para>
  1168. </listitem>
  1169. <listitem>
  1170. <para>
  1171. Year as '
  1172. <emphasis>year</emphasis>
  1173. '
  1174. (
  1175. <constant>Zend_Date::YEAR</constant>
  1176. )
  1177. </para>
  1178. </listitem>
  1179. <listitem>
  1180. <para>
  1181. Hour as '
  1182. <emphasis>hour</emphasis>
  1183. '
  1184. (
  1185. <constant>Zend_Date::HOUR_SHORT</constant>
  1186. )
  1187. </para>
  1188. </listitem>
  1189. <listitem>
  1190. <para>
  1191. Minute as '
  1192. <emphasis>minute</emphasis>
  1193. '
  1194. (
  1195. <constant>Zend_Date::MINUTE_SHORT</constant>
  1196. )
  1197. </para>
  1198. </listitem>
  1199. <listitem>
  1200. <para>
  1201. Second as '
  1202. <emphasis>second</emphasis>
  1203. '
  1204. (
  1205. <constant>Zend_Date::SECOND_SHORT</constant>
  1206. )
  1207. </para>
  1208. </listitem>
  1209. <listitem>
  1210. <para>
  1211. Abbreviated timezone as '
  1212. <emphasis>timezone</emphasis>
  1213. '
  1214. (
  1215. <constant>Zend_Date::TIMEZONE</constant>
  1216. )
  1217. </para>
  1218. </listitem>
  1219. <listitem>
  1220. <para>
  1221. Unix timestamp as '
  1222. <emphasis>timestamp</emphasis>
  1223. '
  1224. (
  1225. <constant>Zend_Date::TIMESTAMP</constant>
  1226. )
  1227. </para>
  1228. </listitem>
  1229. <listitem>
  1230. <para>
  1231. Number of weekday as '
  1232. <emphasis>weekday</emphasis>
  1233. '
  1234. (
  1235. <constant>Zend_Date::WEEKDAY_DIGIT</constant>
  1236. )
  1237. </para>
  1238. </listitem>
  1239. <listitem>
  1240. <para>
  1241. Day of year as '
  1242. <emphasis>dayofyear</emphasis>
  1243. '
  1244. (
  1245. <constant>Zend_Date::DAY_OF_YEAR</constant>
  1246. )
  1247. </para>
  1248. </listitem>
  1249. <listitem>
  1250. <para>
  1251. Week as '
  1252. <emphasis>week</emphasis>
  1253. '
  1254. (
  1255. <constant>Zend_Date::WEEK</constant>
  1256. )
  1257. </para>
  1258. </listitem>
  1259. <listitem>
  1260. <para>
  1261. Delay of timezone to
  1262. <acronym>GMT</acronym>
  1263. as
  1264. '
  1265. <emphasis>gmtsecs</emphasis>
  1266. '
  1267. (
  1268. <constant>Zend_Date::GMT_SECS</constant>
  1269. )
  1270. </para>
  1271. </listitem>
  1272. </itemizedlist>
  1273. </entry>
  1274. </row>
  1275. <row>
  1276. <entry>
  1277. <methodname>toValue()</methodname>
  1278. </entry>
  1279. <entry>
  1280. <para>
  1281. <emphasis>
  1282. <methodname>toValue($part = null)</methodname>
  1283. </emphasis>
  1284. </para>
  1285. <para>
  1286. Returns an integer representation of the selected date
  1287. <varname>$part</varname>
  1288. according to the conventions of the
  1289. object's locale. Returns
  1290. <constant>FALSE</constant>
  1291. when
  1292. <varname>$part</varname>
  1293. selects a non-numeric value, such as
  1294. <constant>Zend_Date::MONTH_NAME_SHORT</constant>
  1295. .
  1296. </para>
  1297. <note>
  1298. <title>Limitation of toValue()</title>
  1299. <para>
  1300. This method calls
  1301. <link linkend="id.date.basic.operations">
  1302. <methodname>get()</methodname>
  1303. </link>
  1304. and casts the result to a
  1305. <acronym>PHP</acronym>
  1306. integer, which will give unpredictable results, if
  1307. <methodname>get()</methodname>
  1308. returns a numeric string
  1309. containing a number too large for a
  1310. <acronym>PHP</acronym>
  1311. integer on your system. Use
  1312. <methodname>get()</methodname>
  1313. instead.
  1314. </para>
  1315. </note>
  1316. </entry>
  1317. </row>
  1318. <row>
  1319. <entry>
  1320. <link linkend="id.date.basic.operations">get()</link>
  1321. </entry>
  1322. <entry>
  1323. <para>
  1324. <emphasis>
  1325. <methodname>get($part = null, $locale = null)</methodname>
  1326. </emphasis>
  1327. </para>
  1328. <para>
  1329. This method returns the
  1330. <varname>$part</varname>
  1331. of object's date
  1332. localized to
  1333. <varname>$locale</varname>
  1334. as a formatted string or
  1335. integer. See
  1336. <link linkend="id.date.basic.operations">get()</link>
  1337. for more information.
  1338. </para>
  1339. </entry>
  1340. </row>
  1341. <row>
  1342. <entry>
  1343. <methodname>now()</methodname>
  1344. </entry>
  1345. <entry>
  1346. <para>
  1347. <emphasis>
  1348. <methodname>now($locale = null)</methodname>
  1349. </emphasis>
  1350. </para>
  1351. <para>
  1352. This convenience function is equivalent to
  1353. <command>new
  1354. Zend_Date()</command>
  1355. . It returns the current date as a
  1356. <classname>Zend_Date</classname>
  1357. object, having
  1358. <varname>$locale</varname>
  1359. </para>
  1360. </entry>
  1361. </row>
  1362. </tbody>
  1363. </tgroup>
  1364. </table>
  1365. </sect2>
  1366. <sect2 id="zend.date.others.fractions">
  1367. <title>Working with Fractions of Seconds</title>
  1368. <para>
  1369. Several methods support retrieving values related to a
  1370. <classname>Zend_Date</classname>
  1371. instance.
  1372. </para>
  1373. <table id="zend.date.others.fractions.table">
  1374. <title>Date Output Methods</title>
  1375. <tgroup cols="2">
  1376. <thead>
  1377. <row>
  1378. <entry>Method</entry>
  1379. <entry>Explanation</entry>
  1380. </row>
  1381. </thead>
  1382. <tbody>
  1383. <row>
  1384. <entry>
  1385. <para>
  1386. <emphasis>
  1387. <methodname>getFractionalPrecision()</methodname>
  1388. </emphasis>
  1389. </para>
  1390. </entry>
  1391. <entry>Return the precision of the part seconds</entry>
  1392. </row>
  1393. <row>
  1394. <entry>
  1395. <para>
  1396. <emphasis>
  1397. <methodname>setFractionalPrecision()</methodname>
  1398. </emphasis>
  1399. </para>
  1400. </entry>
  1401. <entry>Set the precision of the part seconds</entry>
  1402. </row>
  1403. </tbody>
  1404. </tgroup>
  1405. </table>
  1406. </sect2>
  1407. <sect2 id="zend.date.other.sun">
  1408. <title>Sunrise / Sunset</title>
  1409. <para>Three methods provide access to geographically localized information about the Sun,
  1410. including the time of sunrise and sunset.</para>
  1411. <table id="zend.date.other.sun.table">
  1412. <title>Miscellaneous Methods</title>
  1413. <tgroup cols="2">
  1414. <thead>
  1415. <row>
  1416. <entry>Method</entry>
  1417. <entry>Explanation</entry>
  1418. </row>
  1419. </thead>
  1420. <tbody>
  1421. <row>
  1422. <entry>
  1423. <para>
  1424. <emphasis>
  1425. <methodname>getSunrise($location)</methodname>
  1426. </emphasis>
  1427. </para>
  1428. </entry>
  1429. <entry>Return the date's time of sunrise</entry>
  1430. </row>
  1431. <row>
  1432. <entry>
  1433. <para>
  1434. <emphasis>
  1435. <methodname>getSunset($location)</methodname>
  1436. </emphasis>
  1437. </para>
  1438. </entry>
  1439. <entry>Return the date's time of sunset</entry>
  1440. </row>
  1441. <row>
  1442. <entry>
  1443. <para>
  1444. <emphasis>
  1445. <methodname>getSunInfo($location)</methodname>
  1446. </emphasis>
  1447. </para>
  1448. </entry>
  1449. <entry>Return an array with the date's sun dates</entry>
  1450. </row>
  1451. </tbody>
  1452. </tgroup>
  1453. </table>
  1454. </sect2>
  1455. </sect1>