Represents duration in a project.
More...
#include <Duration.h>
Inherits IEquatable< Aspose::Tasks::Duration >, and 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.
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.
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.
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.
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.
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.
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.
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.
System::TimeSpan Aspose::Tasks::Duration::get_TimeSpan |
( |
| ) |
const |
TimeUnitType Aspose::Tasks::Duration::get_TimeUnit |
( |
| ) |
const |
Gets time unit type for this object. The time unit type of this Duration instance.
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.
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.
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.
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.
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.
double Aspose::Tasks::Duration::ToDouble |
( |
| ) |
|
System::String Aspose::Tasks::Duration::ToString |
( |
| ) |
const |
|
override |
Returns a string representation of this instance.
- Returns
- a string representation of this instance.