xs.date.subtract( $value as xs.date|xs.yearMonthDuration|xs.dayTimeDuration ) as xs.dayTimeDuration|xs.date
Returns the difference between two xs.dates as an xs.dayTimeDuration. Returns the beginning of a time period by subtracting an xs.yearMonthDuration from the xs.datethat ends the period. Returns the beginning of a time period by subtracting an xs.dayTimeDuration from the xs.date that ends the period.
|$value||A date or year month druation or day time duration.|
var v1 = xs.date('2013-08-15'); var v2 = xs.yearMonthDuration("P3Y3M"); v1.subtract(v2);