System::DateTime::operator- 方法
DateTime::operator-(DateTime) const method
返回一个 TimeSpan 类的实例,表示当前对象和指定对象所表示的日期时间值之间的时间间隔。
TimeSpan System::DateTime::operator-(DateTime value) const
| 参数 | 类型 | 描述 |
|---|---|---|
| value | DateTime | 一个 DateTime 类实例,标记要计算的区间的一端 |
ReturnValue
一个 TimeSpan 类实例,表示当前对象和 value 所表示的日期和时间值之间的时间间隔。
另见
- Class TimeSpan
- Class DateTime
- Class DateTime
- Namespace System
- Library Aspose.Font for C++
DateTime::operator-(TimeSpan) const method
返回一个新的 DateTime 类实例,表示日期和时间值,该值是从当前对象所表示的值中减去指定时间跨度后的结果。
DateTime System::DateTime::operator-(TimeSpan value) const
| 参数 | 类型 | 描述 |
|---|---|---|
| 值 | TimeSpan | 要减去的时间间隔 |
ReturnValue
一个新的 DateTime 类实例,表示从当前对象表示的值减去 value 后得到的日期和时间值。
另见
- Class DateTime
- Class TimeSpan
- Class DateTime
- Namespace System
- Library Aspose.Font for C++