I need the SQL function Week(Date) to be I18N compliant. That is: It must provide calendar week definitions, that include the definition of ISO 8601. https://en.wikipedia.org/wiki/ISO_week_date

Why is this? While you can enhance the engine with any custom user defined function, it’s performance does not allow to apply it in a query that returns large result sets in a BI scenario. Calendar weeks are often used similar to quarters of a year. They are used to define date ranges for aggregating cost, efforts, results, etc.

And they are used in business intelligence scenarios, where a query accesses 100 k records and more.

This requires a sufficient performance, which is not reached by user defined functions, where a lot of calculations and operations are run over and over again per record, instead of getting set at session startup or with the query before reading the first record.

This could get controlled by an SQL Session parameter, by an OpenEdge startup parameter, by a second parameter of the week funkction, e. g. Week(Date,WeekDefinition), where Week Definition could take a parameter of type "string" referring to a standard such as "ISO 8601" or by supplying a culture such as "en/us".