Q:

arrange weekdays according to country

I want to display sequence of weekdays according to country. How can I achieve this using SAPUI5 and Javascript or jQuery
Sequence according to country should be
India: Mon, Tue, Wed, Thur, Fri, Sat, Sun

Dubai: Sun, Mon, ...

A:

SAPUI5 actually does contain information for this.
Have a look at the getFirstDayOfWeek method of the LocaleData object.
To get the first day of the week for Dubai and India:
new sap.ui.core.LocaleData(new sap.ui.core.Locale("ar_AE")).getFirstDayOfWeek()
// => 6

new sap.ui.core.LocaleData(new sap.ui.core.Locale("en_IN")).getFirstDayOfWeek()
// => 0

Or you could get the current locale from the browser / OS settings:
new sap.ui.core.LocaleData(sap.ui.getCore().getConfiguration().getLocale()).getFirstDayOfWeek()

