You can subtract one xs:date from another one and then you get an xs:dayTimeDuration of which you can extract components e.g. xs:date('2015-06-11') - xs:date('2015-06-01') gives an xs:dayTimeDurationP10D and you can then call http://www.w3.org/TR/xquery-operators/#func-days-from-duration e.g. days-from-duration(xs:date('2015-06-11') - xs:date('2015-06-01')) which gives 10.
You can subtract one
xs:date
from another one and then you get anxs:dayTimeDuration
of which you can extract components e.g.xs:date('2015-06-11') - xs:date('2015-06-01')
gives anxs:dayTimeDuration
P10D
and you can then call http://www.w3.org/TR/xquery-operators/#func-days-from-duration e.g.days-from-duration(xs:date('2015-06-11') - xs:date('2015-06-01'))
which gives10
.