.. _functx_yearMonthDuration: ======================== functx:yearMonthDuration ======================== Constrói um yearMonthDuration a partir de anos e meses Descrição ~~~~~~~~~ A função functx:yearMonthDuration constrói um valor xs:yearMonthDuration a partir de dois argumentos, com o número de anos e o número de meses. Zero pode ser indicado pelo número 0 ou pela sequência vazia. Se os dois argumentos forem zero ou a sequência vazia, devolve P0M. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parâmetros** - **Descrição** * - years:numeric() - o número de anos * - months:integer() - o número de meses Exemplos ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Resultado** * - functx:yearMonthDuration(1,6) - P1Y6M * - functx:yearMonthDuration(1.5,0) - P1Y6M * - functx:yearMonthDuration(1,()) - P1Y * - functx:yearMonthDuration(1,0) - P1Y * - functx:yearMonthDuration(-1,-3) - -P1Y3M * - functx:yearMonthDuration(-1,3) - -P9M * - functx:yearMonthDuration(0,0) - P0M Depende de ~~~~~~~~~~ * :ref:`functx_if-empty`. Veja também ~~~~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_dayTimeDuration`.