Class sap.ui.core.Configuration.FormatSettingsModule: sap/ui/core/Configuration
Encapsulates configuration settings that are related to data formatting/parsing.
Note: When format configuration settings are modified through this class, UI5 only ensures that formatter objects created after that point in time will honor the modifications. To be on the safe side, applications should do any modifications early in their lifecycle or recreate any model/UI that is locale dependent.
sClassName
and enriches it with the information contained in oClassInfo
.sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.ui.base.Object.extend.
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
If no such locale has been defined, this method falls back to the language, see Configuration.getLanguage().
If any user preferences for date, time or number formatting have been set, and if no format locale has been specified, then a special private use subtag is added to the locale, indicating to the framework that these user preferences should be applied.
{sap.ui.core.Locale} | the format locale |
{object[]} | Returns an array contains the customizing data. Each element in the array has properties: dateFormat, islamicMonthStart, gregDate. For details, please see setLegacyDateCalendarCustomizing |
If a pattern is defined, it will be preferred over patterns derived from the current locale.
See class sap.ui.core.format.DateFormat for details about the pattern syntax.
After changing the date pattern, the framework tries to update localization specific parts of the UI. See the documentation of sap.ui.core.Configuration#setLanguage for details and restrictions.
{string} | sStyle | must be one of short, medium, long or full. |
{string} | sPattern | the format pattern to be used in LDML syntax. |
{sap.ui.core.Configuration.FormatSettings} | Returns this to allow method chaining |
If a value is defined, it will be preferred over values derived from the current locale.
Usually in the US the week starts on Sunday while in most European countries on Monday. There are special cases where you want to have the first day of week set independent of the user locale.
After changing the first day of week, the framework tries to update localization specific parts of the UI. See the documentation of sap.ui.core.Configuration#setLanguage for details and restrictions.
{number} | iValue | must be an integer value between 0 and 6 |
{sap.ui.core.Configuration.FormatSettings} | Returns this to allow method chaining |
{object[]} | aMappings | contains the customizing data for the support of Islamic calendar. |
{string} | aMappings[].dateFormat | The date format |
{string} | aMappings[].islamicMonthStart | The Islamic date |
{string} | aMappings[].gregDate | The corresponding Gregorian date |
{sap.ui.core.Configuration.FormatSettings} | Returns this to allow method chaining |
This method modifies the date patterns for 'short' and 'medium' style with the corresponding ABAP format. When called with a null or undefined format id, any previously applied format will be removed.
After changing the legacy date format, the framework tries to update localization specific parts of the UI. See the documentation of sap.ui.core.Configuration#setLanguage for details and restrictions.
Note: Iranian date format 'C' is NOT yet supported by UI5. It's accepted by this method for convenience (user settings from ABAP system can be used without filtering), but it's ignored. Instead, the formats from the current format locale will be used and a warning will be logged.
{string} | sFormatId | id of the ABAP data format (one of '1','2','3','4','5','6','7','8','9','A','B','C') |
{sap.ui.core.Configuration.FormatSettings} | Returns this to allow method chaining |
This method will modify the 'group' and 'decimal' symbols. When called with a null or undefined format id, any previously applied format will be removed.
After changing the legacy number format, the framework tries to update localization specific parts of the UI. See the documentation of sap.ui.core.Configuration#setLanguage for details and restrictions.
{string} | sFormatId | id of the ABAP number format set (one of ' ','X','Y') |
{sap.ui.core.Configuration.FormatSettings} | Returns this to allow method chaining |
This method sets the time patterns for 'short' and 'medium' style to the corresponding ABAP formats and sets the day period texts to "AM"/"PM" or "am"/"pm" respectively. When called with a null or undefined format id, any previously applied format will be removed.
After changing the legacy time format, the framework tries to update localization specific parts of the UI. See the documentation of sap.ui.core.Configuration#setLanguage for details and restrictions.
{string} | sFormatId | id of the ABAP time format (one of '0','1','2','3','4') |
{sap.ui.core.Configuration.FormatSettings} | Returns this to allow method chaining |
If a symbol is defined, it will be preferred over symbols derived from the current locale.
See class sap.ui.core.format.NumberFormat for details about the symbols.
After changing the number symbol, the framework tries to update localization specific parts of the UI. See the documentation of sap.ui.core.Configuration#setLanguage for details and restrictions.
{string} | sStyle | must be one of decimal, group, plusSign, minusSign. |
{string} | sSymbol | will be used to represent the given symbol type |
{sap.ui.core.Configuration.FormatSettings} | Returns this to allow method chaining |
If a pattern is defined, it will be preferred over patterns derived from the current locale.
See class sap.ui.core.format.DateFormat for details about the pattern syntax.
After changing the time pattern, the framework tries to update localization specific parts of the UI. See the documentation of sap.ui.core.Configuration#setLanguage for details and restrictions.
{string} | sStyle | must be one of short, medium, long or full. |
{string} | sPattern | the format pattern to be used in LDML syntax. |
{sap.ui.core.Configuration.FormatSettings} | Returns this to allow method chaining |