new ArchValueDuration(coreExpressionViewModel)
This class holds a value in Architect Scripting. Data Type: Duration Maximum value allowed: 999999999999999 ms ( 11574074 days, 1 hour, 46 minutes and 39.999 seconds ) Minimum value allowed: -999999999999999 ms ( -11574074 days, -1 hour, -46 minutes and -39.999 seconds ) Note: Do not attempt to create instances of this class directly. They will be created automatically as needed by Architect Scripting.
Parameters:
| Name | Type | Description |
|---|---|---|
coreExpressionViewModel |
object | ( Internal ) an expression view model from core. |
Extends
Members
-
static, readonly displayTypeName :string
-
Implements override support for the display type name string for this Architect Scripting object.
-
static isArchValueDuration :boolean
-
Returns true indicating that this is an ArchValueDuration instance.
-
readonly isCollection :boolean
-
Returns false indicating that this value is a singleton value and not a collection value.
- Inherited From:
-
readonly valueText :string
-
Returns a JavaScript string representing the value specified on this ArchBaseValueSingleton instance. If this value is an expression, it returns the expression text. If this value is a variable, it returns the variable text. If this value is a literal, it will return a string that represents the value. Overall this property is meant to be a quick and easy way to look at a "value" string but it is not meant to be some kind of fully inclusive description of this ArchBaseValueSingleton instance overall. For most values that inherit from this class, it's pretty obvious what to expect as the returned string but there are a couple worth mentioning:
ArchValueCurrency - a string formatted with '<amount>|<code>" where code is an ISO 4217 string. ArchValueDate - a string formatted as 'YYYY-MM-DD' where YYYY is 4 digit year, MM is 2 digit month and DD is two digit day. ArchValueDateTime - an ISO 8601 formatted string. ArchValueDuration - an XSD formatted duration string. ArchValueTime - a string formatted as 'hh:mm:ss' where hh is 2 digit hour, mm is 2 digit minute and ss is 2 digit second.While we don't guarantee it in Scripting because this isn't the same runtime function evaluation engine that flows use, when accessing this property on a singleton value will be very similar to calling the ToString function in expressions at runtime.
- Inherited From:
Methods
-
setExpressionNotSet()
-
This method sets the expression of NOT_SET on this value.
- Inherited From:
-
setLiteralMaxDuration()
-
Sets the maximum duration supported in Architect as a literal.
-
setLiteralMinDuration()
-
Sets the minimum duration supported in Architect as a literal.
-
setLiteralMs(milliseconds)
-
This sets the duration literal value from a specified number of milliseconds.
Parameters:
Name Type Description millisecondsnumber the number of milliseconds for the duration. This value should be an integer. If undefined or null, it will be treated as 0.
-
setLiteralTimeParts(daysopt, hoursopt, minutesopt, secondsopt, millisecondsopt)
-
This sets the duration literal value from time parts.
Parameters:
Name Type Attributes Description daysnumber <optional>
the number of days for the duration. This value should be an integer. If undefined or null, it will be treated as 0.
hoursnumber <optional>
the number of hours for the duration. This value should be an integer. If undefined or null, it will be treated as 0.
minutesnumber <optional>
the number of minutes for the duration. This value should be an integer. If undefined or null, it will be treated as 0.
secondsnumber <optional>
the number of seconds for the duration. This value should be an integer. If undefined or null, it will be treated as 0.
millisecondsnumber <optional>
the number of milliseconds for the duration. This value should be an integer. If undefined or null, it will be treated as 0.