Represents duration in a project.
More...
#include <Duration.h>
Inherits System::IEquatable< Aspose::Tasks::Duration >, and System::Details::BoxableObjectBase.
|
static Duration | Parse (const System::SharedPtr< Project > &p, const System::String &value) |
| Converts the specified string to the instance of Duration struct. More...
|
|
static System::TimeSpan | ParseTimeSpan (const System::String &value) |
| Parses duration string in format "PT--H--M--S--". More...
|
|
Represents duration in a project.
◆ Add() [1/2]
Duration Aspose::Tasks::Duration::Add |
( |
double |
val | ) |
|
Adds specified double value to this duration.
- Parameters
-
val | the specified double value to add to this instance. |
- Returns
- New duration object that represents the value of this instance plus the specified duration value.
◆ Add() [2/2]
Adds specified duration to this duration.
- Parameters
-
d | specified Duration to add to this instance. |
- Returns
- New duration object that represents the value of this instance plus the specified duration value.
◆ Convert()
Duration Aspose::Tasks::Duration::Convert |
( |
TimeUnitType |
timeUnitType | ) |
|
Converts Duration object to another duration with specified time units.
- Parameters
-
timeUnitType | the specified time unit type. |
- Returns
- returns new duration with the specified unit type.
◆ Equals() [1/2]
bool Aspose::Tasks::Duration::Equals |
( |
Duration |
other | ) |
|
|
override |
Returns a value indicating whether this instance is equal to a specified object.
- Parameters
-
other | The object to compare with this instance. |
- Returns
- Returns True if other Duration instance has the same TimeSpan and TimeUnit values as this instance; otherwise, false.
◆ Equals() [2/2]
bool Aspose::Tasks::Duration::Equals |
( |
System::SharedPtr< System::Object > |
obj | ) |
|
|
override |
Returns a value indicating whether this instance is equal to a specified object.
- Parameters
-
obj | The object to compare with this instance. |
- Returns
- True if the specified object is a Duration that has the same TimeSpan and TimeUnit values as this instance; otherwise, false.
◆ get_IsElapsed()
bool Aspose::Tasks::Duration::get_IsElapsed |
( |
| ) |
const |
Gets a value indicating whether time unit is elapsed. The flag which determines whether this Duration instance is elapsed.
◆ get_IsEstimated()
bool Aspose::Tasks::Duration::get_IsEstimated |
( |
| ) |
const |
Gets a value indicating whether time unit is estimated. The flag which determines whether this Duration instance is estimated.
◆ get_TimeSpan()
System::TimeSpan Aspose::Tasks::Duration::get_TimeSpan |
( |
| ) |
const |
◆ get_TimeUnit()
TimeUnitType Aspose::Tasks::Duration::get_TimeUnit |
( |
| ) |
const |
Gets time unit type for this object. The time unit type of this Duration instance.
◆ GetHashCode()
int32_t Aspose::Tasks::Duration::GetHashCode |
( |
| ) |
const |
|
override |
Returns a hash code value for this object.
- Returns
- returns a hash code value for this duration instance.
◆ Parse()
static Duration Aspose::Tasks::Duration::Parse |
( |
const System::SharedPtr< Project > & |
p, |
|
|
const System::String & |
value |
|
) |
| |
|
static |
Converts the specified string to the instance of Duration struct.
- Parameters
-
p | the specified instance of Project class to convert duration for. |
value | the specified string to convert. |
- Returns
- Returns the converted instance of Duration struct.
◆ ParseTimeSpan()
static System::TimeSpan Aspose::Tasks::Duration::ParseTimeSpan |
( |
const System::String & |
value | ) |
|
|
static |
Parses duration string in format "PT--H--M--S--".
- Parameters
-
value | the specified string to parse. |
- Returns
- returns parsed instance of the TimeSpan struct.
◆ Subtract() [1/2]
Duration Aspose::Tasks::Duration::Subtract |
( |
double |
val | ) |
|
Subtracts specified double value from this duration instance.
- Parameters
-
val | specified double value to subtract from this instance. |
- Returns
- New duration object that represents the value of this instance minus the specified duration value.
◆ Subtract() [2/2]
Subtracts specified duration from this duration instance.
- Parameters
-
d | the specified Duration instance to subtract from this instance. |
- Returns
- New duration object that represents the value of this instance minus the specified duration value.
◆ ToDouble()
double Aspose::Tasks::Duration::ToDouble |
( |
| ) |
|
◆ ToString()
System::String Aspose::Tasks::Duration::ToString |
( |
| ) |
const |
|
override |
Returns a string representation of this instance.
- Returns
- a string representation of this instance.