<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/temporal.documentPeriod.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>temporal.documentPeriod</api:function-name><api:suggest>temporal.documentperiod</api:suggest><api:suggest>temporal</api:suggest><api:suggest>documentperiod</api:suggest><api:function-link mode="xquery" fullname="temporal:document-period">/apidoc/8.0/temporal:document-period.xml</api:function-link><api:function mode="javascript" name="documentPeriod" type="builtin" lib="temporal" category="SearchBuiltins" subcategory="Temporal" hidden="false" bucket="MarkLogic Built-In Functions" prefix="temporal" namespace="http://marklogic.com/xdmp/temporal" fullname="temporal.documentPeriod"><api:summary>
  This function returns the period (as a dateTime pair) for the named axis in
  the document identified by its root node in the named collection.
  <p xmlns="http://www.w3.org/1999/xhtml">
  An TEMPORAL-NOAXISINFO exception is thrown if no information is found in 
  root for the axis.
  </p>
  </api:summary><api:params><api:param name="temporal-collection" type="xs:string"><api:param-description>
    The name of the temporal collection.
    </api:param-description><api:param-name>temporal-collection</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="axis" type="xs:string"><api:param-description>
    The name of axis from which to get the period.
    </api:param-description><api:param-name>axis</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="root" type="node()"><api:param-description>
    The root node of the document.
    </api:param-description><api:param-name>root</api:param-name><api:param-type>Node</api:param-type></api:param></api:params><api:return>ValueIterator</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
var temporal = require("/MarkLogic/temporal.xqy");
temporal.documentPeriod("temporal", "valid", 
  cts.doc("clue.xml.7788866244426452375"));

=&gt; Returns the period for the valid axis set for the document, 
   "clue.xml.7788866244426452375". 

</pre></api:example></api:function></api:function-page>