| // Copyright (C) 2020 Igalia, S.L. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| |
| /*--- |
| esid: sec-temporal.plaintime.prototype.subtract |
| description: A string is parsed into the correct object when passed as the argument |
| includes: [temporalHelpers.js] |
| features: [Temporal] |
| ---*/ |
| |
| const instance = Temporal.PlainTime.from({ hour: 12, minute: 34, second: 56, millisecond: 987, microsecond: 654, nanosecond: 321 }); |
| const result = instance.subtract("PT3M"); |
| TemporalHelpers.assertPlainTime(result, 12, 31, 56, 987, 654, 321); |