.. _functx_total-seconds-from-duration: ================================== functx:total-seconds-from-duration ================================== O total de segundos de um dayTimeDuration Descrição ~~~~~~~~~ A função functx:total-seconds-from-duration devolve o total de segundos de $duration. É diferente da função fn:seconds-from-duration, que normaliza o valor e só devolve o resto de segundos, entre 1 e 60. Por exemplo, fn:seconds-from-duration(xs:dayTimeDuration("PT90S")) devolve 30, e functx:total-seconds-from-duration(xs:dayTimeDuration("PT90S")) devolve 90. Se $duration for a sequência vazia, devolve a sequência vazia. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parâmetros** - **Descrição** * - duration:time() - a duração Exemplos ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Resultado** * - functx:total-seconds-from-duration(xs:dayTimeDuration('PT90S')) - 90 * - functx:total-seconds-from-duration(xs:dayTimeDuration('PT90.5S')) - 90.5 * - functx:total-seconds-from-duration(xs:dayTimeDuration('PT1M30S')) - 90 * - functx:total-seconds-from-duration(xs:dayTimeDuration('PT3M')) - 180 Veja também ~~~~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`seconds-from-duration`. * :ref:`functx_total-minutes-from-duration`. * :ref:`functx_total-hours-from-duration`. * :ref:`functx_total-days-from-duration`. * :ref:`functx_total-months-from-duration`. * :ref:`functx_total-years-from-duration`.