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.
Parâmetros |
Descrição |
|---|---|
years:numeric() |
o número de anos |
months:integer() |
o número de meses |
Exemplos
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 |