<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.quarterFromDate.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.quarterFromDate</api:function-name><api:suggest>xdmp.quarterfromdate</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>quarterfromdate</api:suggest><api:function-link mode="xquery" fullname="xdmp:quarter-from-date">/apidoc/8.0/xdmp:quarter-from-date.xml</api:function-link><api:function mode="javascript" name="quarterFromDate" type="builtin" lib="xdmp" category="DurationDateTimeBuiltins" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.quarterFromDate"><api:summary>
<p xmlns="http://www.w3.org/1999/xhtml">Returns an xs:integer between 1 and 4, both inclusive, calculating the
quarter component in the localized value of $arg.
</p><p xmlns="http://www.w3.org/1999/xhtml">
If $arg is the empty sequence, returns the empty sequence.
</p>
</api:summary><api:params><api:param name="arg" type="xs:date?"><api:param-description>
The date whose quarter component will be returned.
  </api:param-description><api:param-name>arg</api:param-name><api:param-type>Date?</api:param-type></api:param></api:params><api:return>Number?</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.quarterFromDate(xs.date("1999-05-31"))
=&gt; 2 
</pre>
</api:example><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.quarterFromDate(xs.date("2000-01-01"))
=&gt; 1
</pre>
</api:example></api:function></api:function-page>