Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

toTimestamp client-side function #105

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion vocabularies/UI.json
Original file line number Diff line number Diff line change
Expand Up @@ -1928,6 +1928,35 @@
"Property"
],
"@Core.Description": "The contents of this property must not be propagated to the app-to-app navigation context"
}
},
"toTimestamp": [
{
"$Kind": "Function",
"@Core.Description": "Representation of the given point in time as an `Edm.DateTimeOffset` whose [timezone fragment](https://www.w3.org/TR/xmlschema11-2/#nt-tzFrag) is `Z`",
"$Parameter": [
{
"$Name": "Date",
"$Type": "Edm.Date",
"$Nullable": true
},
{
"$Name": "TimeOfDay",
"$Type": "Edm.TimeOfDay",
"$Nullable": true
},
{
"$Name": "Timezone",
"$Nullable": true,
"@Core.Description": "Time zone according to the [IANA](https://www.iana.org/time-zones) standard",
"@Core.LongDescription": "If absent, the time zone of the UI (Fiori Launchpad) is implied"
}
],
"$ReturnType": {
"$Type": "Edm.DateTimeOffset",
"$Nullable": true,
"$Precision": 0
}
}
]
}
}
7 changes: 7 additions & 0 deletions vocabularies/UI.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ Term|Type|Description
[RecommendationList](UI.xml#L1567)|[RecommendationListType?](#RecommendationListType)|<a name="RecommendationList"></a>Specifies how to get a list of recommended values for a property or parameter<p>Intelligent systems can help users by recommending input the user may "prefer".</p>
[ExcludeFromNavigationContext](UI.xml#L1599)|[Tag](https://github.com/oasis-tcs/odata-vocabularies/blob/master/vocabularies/Org.OData.Core.V1.md#Tag)|<a name="ExcludeFromNavigationContext"></a>The contents of this property must not be propagated to the app-to-app navigation context


## Functions

Function|Signature|Description
:-------|:--------|:----------
[toTimestamp](UI.xml#L1603)|Date:&nbsp;Date?, TimeOfDay:&nbsp;TimeOfDay?, Timezone:&nbsp;String? &rarr;&nbsp;DateTimeOffset?|<a name="toTimestamp"></a>Representation of the given point in time as an `Edm.DateTimeOffset` whose [timezone fragment](https://www.w3.org/TR/xmlschema11-2/#nt-tzFrag) is `Z`

## <a name="HeaderInfoType"></a>[HeaderInfoType](UI.xml#L62)


Expand Down
10 changes: 10 additions & 0 deletions vocabularies/UI.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1600,6 +1600,16 @@ This is in contrast to [DataFieldForIntentBasedNavigation](#DataFieldForIntentBa
<Annotation Term="Core.Description" String="The contents of this property must not be propagated to the app-to-app navigation context" />
</Term>

<Function Name="toTimestamp">
<Annotation Term="Core.Description" String="Representation of the given point in time as an `Edm.DateTimeOffset` whose [timezone fragment](https://www.w3.org/TR/xmlschema11-2/#nt-tzFrag) is `Z`" />
<Parameter Name="Date" Type="Edm.Date"/>
<Parameter Name="TimeOfDay" Type="Edm.TimeOfDay"/>
<Parameter Name="Timezone" Type="Edm.String">
<Annotation Term="Core.Description" String="Time zone according to the [IANA](https://www.iana.org/time-zones) standard" />
<Annotation Term="Core.LongDescription" String="If absent, the time zone of the UI (Fiori Launchpad) is implied" />
</Parameter>
<ReturnType Type="Edm.DateTimeOffset"/>
</Function>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This defines a server-side function.

We should discuss in the OData TC whether this is also the way to go for defining client-side functions, and how to mark these functions as "client-side".

Could you please open a TC jira issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

</Schema>
</edmx:DataServices>
</edmx:Edmx>