Compares two durations. Years, months, weeks and days have no fixed length (a day is not always 24 hours across a DST change), so they must be the same. The other units compare by their length: PT1H equals PT60M, but P1D does not equal PT24H.
PT1H
PT60M
P1D
PT24H
Compares two durations. Years, months, weeks and days have no fixed length (a day is not always 24 hours across a DST change), so they must be the same. The other units compare by their length:
PT1HequalsPT60M, butP1Ddoes not equalPT24H.