This class represents the OData V4 primitive type Edm.TimeOfDay
. In sap.ui.model.odata.v4.ODataModel this type is represented as a
string
.
Constructor for an OData primitive type Edm.TimeOfDay
.
new sap.ui.model.odata.type.TimeOfDay(oFormatOptions?, oConstraints?)
Param | Type | Default Value | Description |
---|---|---|---|
oFormatOptions? | object | Format options as defined in sap.ui.core.format.DateFormat |
|
oConstraints? | object | Constraints; validateValue throws an error if any constraint is violated |
|
nullable? | boolean | true | If |
precision? | number | 0 | The number of decimal places allowed in the seconds portion of a valid value; must be an integer between 0 and 12, otherwise the default value 0 is used. |
Method | Description |
---|---|
sap.ui.model.odata.type.TimeOfDay.extend |
Creates a new subclass of class sap.ui.model.odata.type.TimeOfDay with name
|
formatValue |
Formats the given value to the given target type. |
sap.ui.model.odata.type.TimeOfDay.getMetadata |
Returns a metadata object for class sap.ui.model.odata.type.TimeOfDay. |
getName |
Returns the type's name. |
parseValue |
Parses the given value, which is expected to be of the given type, to a string with an OData V4 Edm.TimeOfDay value. |
validateValue |
Validates the given value in model representation and meets the type's constraints. |
Creates a new subclass of class sap.ui.model.odata.type.TimeOfDay 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.odata.type.ODataType.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 |
Formats the given value to the given target type.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValue | string |
The value to be formatted, which is represented as a string in the model |
|
sTargetType | string |
The target type, may be "any", "object" (since 1.69.0), "string", or a type with one of these types as its primitive type. See sap.ui.model.odata.type for more information |
Returns a metadata object for class sap.ui.model.odata.type.TimeOfDay.
Parses the given value, which is expected to be of the given type, to a string with an OData V4 Edm.TimeOfDay value.
Param | Type | DefaultValue | Description |
---|---|---|---|
vValue | Date string |
The value to be parsed, maps |
|
sSourceType | string |
The source type (the expected type of |