src/sap.ui.core/src/sap/ui/core/LocaleData.js
function(aScales, sStyle) {
			if (sStyle === undefined) {
				sStyle = "wide";
			}

			assert(sStyle === "wide" || sStyle === "short" || sStyle === "narrow", "sStyle is only allowed to be set with 'wide', 'short' or 'narrow'");

			var aPatterns = [],
				aPluralCategories = this.getPluralCategories(),
				oScale,
				oTimeEntry,
				iValue,
				iSign;

			if (!aScales) {
				aScales = ["year", "month", "week", "day", "hour", "minute", "second"];
			}

			aScales.forEach(function(sScale) {
				oScale = this._get("dateFields", sScale + "-" + sStyle);
				for (var sEntry in oScale) {
					if (sEntry.indexOf("relative-type-") === 0) {
						iValue = parseInt(sEntry.substr(14));
						aPatterns.push({
							scale: sScale,
							value: iValue,
							pattern: oScale[sEntry]
						});
					} else if (sEntry.indexOf("relativeTime-type-") == 0) {
						oTimeEntry = oScale[sEntry];
						iSign = sEntry.substr(18) === "past" ? -1 : 1;
						aPluralCategories.forEach(function(sKey) { // eslint-disable-line no-loop-func
							aPatterns.push({
								scale: sScale,
								sign: iSign,
								pattern: oTimeEntry["relativeTimePattern-count-" + sKey]
							});
						});
					}
				}
			}.bind(this));

			return aPatterns;
		}
function(aScales, sStyle) {
			if (sStyle === undefined) {
				sStyle = "wide";
			}

			assert(sStyle === "wide" || sStyle === "short" || sStyle === "narrow", "sStyle is only allowed to be set with 'wide', 'short' or 'narrow'");

			var aPatterns = [],
				aPluralCategories = this.getPluralCategories(),
				oScale,
				oTimeEntry,
				iValue,
				iSign;

			if (!aScales) {
				aScales = ["year", "month", "week", "day", "hour", "minute", "second"];
			}

			aScales.forEach(function(sScale) {
				oScale = this._get("dateFields", sScale + "-" + sStyle);
				for (var sEntry in oScale) {
					if (sEntry.indexOf("relative-type-") === 0) {
						iValue = parseInt(sEntry.substr(14));
						aPatterns.push({
							scale: sScale,
							value: iValue,
							pattern: oScale[sEntry]
						});
					} else if (sEntry.indexOf("relativeTime-type-") == 0) {
						oTimeEntry = oScale[sEntry];
						iSign = sEntry.substr(18) === "past" ? -1 : 1;
						aPluralCategories.forEach(function(sKey) { // eslint-disable-line no-loop-func
							aPatterns.push({
								scale: sScale,
								sign: iSign,
								pattern: oTimeEntry["relativeTimePattern-count-" + sKey]
							});
						});
					}
				}
			}.bind(this));

			return aPatterns;
		}
function ( aScales , sStyle ) { if ( sStyle === undefined ) { sStyle = "wide" ; } assert ( sStyle === "wide" || sStyle === "short" || sStyle === "narrow" , "sStyle is only allowed to be set with 'wide', 'short' or 'narrow'" ) ; var aPatterns = [ ] , aPluralCategories = this . getPluralCategories ( ) , oScale , oTimeEntry , iValue , iSign ; if ( ! aScales ) { aScales = [ "year" , "month" , "week" , "day" , "hour" , "minute" , "second" ] ; } aScales . forEach ( function ( sScale ) { oScale = this . _get ( "dateFields" , sScale + "-" + sStyle ) ; for ( var sEntry in oScale ) { if ( sEntry . indexOf ( "relative-type-" ) === 0 ) { iValue = parseInt ( sEntry . substr ( 14 ) ) ; aPatterns . push ( { scale : sScale , value : iValue , pattern : oScale [ sEntry ] } ) ; } else if ( sEntry . indexOf ( "relativeTime-type-" ) == 0 ) { oTimeEntry = oScale [ sEntry ] ; iSign = sEntry . substr ( 18 ) === "past" ? - 1 : 1 ; aPluralCategories . forEach ( function ( sKey ) { // eslint-disable-line no-loop-func aPatterns . push ( { scale : sScale , sign : iSign , pattern : oTimeEntry [ "relativeTimePattern-count-" + sKey ] } ) ; } ) ; } } } . bind ( this ) ) ; return aPatterns ; }
Returns relative time patterns for the given scales as an array of objects containing scale, value and pattern.

The array may contain the following values: "year", "month", "week", "day", "hour", "minute" and "second". If
no scales are given, patterns for all available scales will be returned.

The return array will contain objects looking like:
<pre>
{
scale: "minute",
sign: 1,
pattern: "in {0} minutes"
}
</pre>

@param {string[]} aScales The scales for which the available patterns should be returned
@param {string} [sStyle="wide"] @since 1.32.10, 1.34.4 The style of the scale patterns. The valid values are "wide", "short" and "narrow".
@returns {object[]} An array of all relative time patterns
@public
@since 1.34
Returns relative time patterns for the given scales as an array of objects containing scale value and pattern .