This class represents the Date interval composite type.
Constructor for a Date interval type.
new sap.ui.model.type.DateInterval(oFormatOptions?, oConstraints?)
Param | Type | Default Value | Description |
---|---|---|---|
oFormatOptions? | object | Formatting options. For a list of all available options, see DateFormat. |
|
source? | object | Additional set of options used to create a second |
|
oConstraints? | object | Value constraints |
|
minimum? | Date string | Smallest value allowed for this type. Values for constraints must use the same type as configured via |
|
maximum? | Date string | Largest value allowed for this type. Values for constraints must use the same type as configured via |
Method | Description |
---|---|
sap.ui.model.type.DateInterval.extend |
Creates a new subclass of class sap.ui.model.type.DateInterval with name
|
formatValue |
Format the given array containing two values to an output value of type string. Other internal types than 'string' and 'any' are not supported by the date interval type. If a source format has been defined for this type, the formatValue does also accept an array with string values as input. This will be parsed into an array of Dates using the source format. If |
sap.ui.model.type.DateInterval.getMetadata |
Returns a metadata object for class sap.ui.model.type.DateInterval. |
parseValue |
Parse a string value to an array containing two values. Parsing of other internal types than 'string' is not supported by the DateInterval type. In case a source format has been defined, the two values are formatted using the source format after parsing the inteval string and an array which contains two string values is returned. |
Creates a new subclass of class sap.ui.model.type.DateInterval with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.model.CompositeType.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Format the given array containing two values to an output value of type string. Other internal types than 'string' and 'any' are not supported by the date interval type. If a source format has been defined for this type, the formatValue does also accept an array with string values as input. This will be parsed into an array of Dates using the source format.
If aValues
isn't an array, a format exception is thrown. If one of the elements in aValues
is not defined or null, empty string will be returned.
Param | Type | DefaultValue | Description |
---|---|---|---|
aValues | array |
The array of values |
|
sInternalType | string |
The target type |
Returns a metadata object for class sap.ui.model.type.DateInterval.
Parse a string value to an array containing two values. Parsing of other internal types than 'string' is not supported by the DateInterval type. In case a source format has been defined, the two values are formatted using the source format after parsing the inteval string and an array which contains two string values is returned.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValue | any |
The value to be parsed |
|
sInternalType | string |
The source type |
|
aCurrentValues | array |
The current values of all binding parts |