@openui5/sap.ui.core 1.96.12 → 1.96.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRDPARTY.txt +1 -1
- package/package.json +1 -1
- package/src/jquery.sap.global.js +1 -1
- package/src/jquery.sap.properties.js +1 -1
- package/src/jquery.sap.resources.js +1 -1
- package/src/jquery.sap.script.js +1 -1
- package/src/jquery.sap.storage.js +3 -3
- package/src/sap/base/security/URLListValidator.js +36 -3
- package/src/sap/base/util/restricted/_CancelablePromise.js +1 -1
- package/src/sap/base/util/restricted/_castArray.js +1 -1
- package/src/sap/base/util/restricted/_compact.js +1 -1
- package/src/sap/base/util/restricted/_curry.js +1 -1
- package/src/sap/base/util/restricted/_debounce.js +1 -1
- package/src/sap/base/util/restricted/_difference.js +1 -1
- package/src/sap/base/util/restricted/_differenceBy.js +1 -1
- package/src/sap/base/util/restricted/_differenceWith.js +1 -1
- package/src/sap/base/util/restricted/_flatMap.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDeep.js +1 -1
- package/src/sap/base/util/restricted/_flatMapDepth.js +1 -1
- package/src/sap/base/util/restricted/_flatten.js +1 -1
- package/src/sap/base/util/restricted/_flattenDeep.js +1 -1
- package/src/sap/base/util/restricted/_flattenDepth.js +1 -1
- package/src/sap/base/util/restricted/_intersection.js +1 -1
- package/src/sap/base/util/restricted/_intersectionBy.js +1 -1
- package/src/sap/base/util/restricted/_intersectionWith.js +1 -1
- package/src/sap/base/util/restricted/_isEqual.js +1 -1
- package/src/sap/base/util/restricted/_isEqualWith.js +1 -1
- package/src/sap/base/util/restricted/_isNil.js +1 -1
- package/src/sap/base/util/restricted/_max.js +1 -1
- package/src/sap/base/util/restricted/_merge.js +1 -1
- package/src/sap/base/util/restricted/_mergeWith.js +1 -1
- package/src/sap/base/util/restricted/_min.js +1 -1
- package/src/sap/base/util/restricted/_omit.js +1 -1
- package/src/sap/base/util/restricted/_pick.js +1 -1
- package/src/sap/base/util/restricted/_pickBy.js +1 -1
- package/src/sap/base/util/restricted/_throttle.js +1 -1
- package/src/sap/base/util/restricted/_toArray.js +1 -1
- package/src/sap/base/util/restricted/_union.js +1 -1
- package/src/sap/base/util/restricted/_unionBy.js +1 -1
- package/src/sap/base/util/restricted/_unionWith.js +1 -1
- package/src/sap/base/util/restricted/_uniq.js +1 -1
- package/src/sap/base/util/restricted/_uniqBy.js +1 -1
- package/src/sap/base/util/restricted/_uniqWith.js +1 -1
- package/src/sap/base/util/restricted/_without.js +1 -1
- package/src/sap/base/util/restricted/_xor.js +1 -1
- package/src/sap/base/util/restricted/_xorBy.js +1 -1
- package/src/sap/base/util/restricted/_xorWith.js +1 -1
- package/src/sap/base/util/restricted/_zipObject.js +1 -1
- package/src/sap/base/util/restricted/_zipObjectDeep.js +1 -1
- package/src/sap/ui/Device.js +3 -3
- package/src/sap/ui/Global.js +4 -4
- package/src/sap/ui/base/Event.js +1 -1
- package/src/sap/ui/base/EventProvider.js +1 -1
- package/src/sap/ui/base/Interface.js +1 -1
- package/src/sap/ui/base/ManagedObject.js +1 -1
- package/src/sap/ui/base/ManagedObjectMetadata.js +1 -1
- package/src/sap/ui/base/Metadata.js +1 -1
- package/src/sap/ui/base/Object.js +1 -1
- package/src/sap/ui/base/ObjectPool.js +1 -1
- package/src/sap/ui/core/.library +1 -1
- package/src/sap/ui/core/BusyIndicator.js +1 -1
- package/src/sap/ui/core/Component.js +1 -1
- package/src/sap/ui/core/ComponentContainer.js +1 -1
- package/src/sap/ui/core/ComponentMetadata.js +1 -1
- package/src/sap/ui/core/ComponentSupport.js +1 -1
- package/src/sap/ui/core/Control.js +1 -1
- package/src/sap/ui/core/Core.js +1 -1
- package/src/sap/ui/core/CustomData.js +1 -1
- package/src/sap/ui/core/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/Element.js +1 -1
- package/src/sap/ui/core/ElementMetadata.js +1 -1
- package/src/sap/ui/core/EnabledPropagator.js +1 -1
- package/src/sap/ui/core/EventBus.js +1 -1
- package/src/sap/ui/core/Fragment.js +1 -1
- package/src/sap/ui/core/HTML.js +1 -1
- package/src/sap/ui/core/History.js +1 -1
- package/src/sap/ui/core/Icon.js +1 -1
- package/src/sap/ui/core/IndicationColorSupport.js +1 -1
- package/src/sap/ui/core/IntervalTrigger.js +1 -1
- package/src/sap/ui/core/InvisibleMessage.js +1 -1
- package/src/sap/ui/core/InvisibleRenderer.js +1 -1
- package/src/sap/ui/core/InvisibleText.js +1 -1
- package/src/sap/ui/core/Item.js +1 -1
- package/src/sap/ui/core/LabelEnablement.js +1 -1
- package/src/sap/ui/core/LayoutData.js +1 -1
- package/src/sap/ui/core/ListItem.js +1 -1
- package/src/sap/ui/core/LocalBusyIndicator.js +1 -1
- package/src/sap/ui/core/Locale.js +1 -1
- package/src/sap/ui/core/LocaleData.js +1 -1
- package/src/sap/ui/core/Manifest.js +1 -1
- package/src/sap/ui/core/Message.js +1 -1
- package/src/sap/ui/core/RenderManager.js +1 -1
- package/src/sap/ui/core/Renderer.js +1 -1
- package/src/sap/ui/core/ResizeHandler.js +1 -1
- package/src/sap/ui/core/ScrollBar.js +1 -1
- package/src/sap/ui/core/SeparatorItem.js +1 -1
- package/src/sap/ui/core/Title.js +1 -1
- package/src/sap/ui/core/TooltipBase.js +1 -1
- package/src/sap/ui/core/UIArea.js +1 -1
- package/src/sap/ui/core/UIComponent.js +1 -1
- package/src/sap/ui/core/UIComponentMetadata.js +1 -1
- package/src/sap/ui/core/ValueStateSupport.js +1 -1
- package/src/sap/ui/core/VariantLayoutData.js +1 -1
- package/src/sap/ui/core/XMLComposite.js +1 -1
- package/src/sap/ui/core/XMLCompositeMetadata.js +1 -1
- package/src/sap/ui/core/date/Buddhist.js +15 -13
- package/src/sap/ui/core/date/CalendarUtils.js +92 -0
- package/src/sap/ui/core/date/CalendarWeekNumbering.js +76 -0
- package/src/sap/ui/core/date/Japanese.js +42 -4
- package/src/sap/ui/core/date/UniversalDate.js +193 -40
- package/src/sap/ui/core/delegate/ItemNavigation.js +1 -1
- package/src/sap/ui/core/delegate/ScrollEnablement.js +1 -1
- package/src/sap/ui/core/dnd/DragDropBase.js +1 -1
- package/src/sap/ui/core/dnd/DragDropInfo.js +1 -1
- package/src/sap/ui/core/dnd/DragInfo.js +1 -1
- package/src/sap/ui/core/dnd/DropInfo.js +1 -1
- package/src/sap/ui/core/format/DateFormat.js +36 -10
- package/src/sap/ui/core/hyphenation/Hyphenation.js +1 -1
- package/src/sap/ui/core/library.js +3 -3
- package/src/sap/ui/core/message/ControlMessageProcessor.js +1 -1
- package/src/sap/ui/core/message/Message.js +1 -1
- package/src/sap/ui/core/message/MessageManager.js +1 -1
- package/src/sap/ui/core/message/MessageParser.js +1 -1
- package/src/sap/ui/core/message/MessageProcessor.js +1 -1
- package/src/sap/ui/core/mvc/HTMLView.js +1 -1
- package/src/sap/ui/core/mvc/JSONView.js +1 -1
- package/src/sap/ui/core/mvc/JSView.js +1 -1
- package/src/sap/ui/core/mvc/TemplateView.js +1 -1
- package/src/sap/ui/core/mvc/View.js +1 -1
- package/src/sap/ui/core/mvc/XMLView.js +1 -1
- package/src/sap/ui/core/plugin/DeclarativeSupport.js +1 -1
- package/src/sap/ui/core/plugin/LessSupport.js +1 -1
- package/src/sap/ui/core/plugin/TemplatingSupport.js +1 -1
- package/src/sap/ui/core/postmessage/Bus.js +1 -1
- package/src/sap/ui/core/postmessage/confirmationDialog.js +1 -1
- package/src/sap/ui/core/search/OpenSearchProvider.js +1 -1
- package/src/sap/ui/core/search/SearchProvider.js +1 -1
- package/src/sap/ui/core/service/Service.js +1 -1
- package/src/sap/ui/core/service/ServiceFactory.js +1 -1
- package/src/sap/ui/core/service/ServiceFactoryRegistry.js +1 -1
- package/src/sap/ui/core/support/Plugin.js +1 -1
- package/src/sap/ui/core/support/Support.js +1 -1
- package/src/sap/ui/core/support/plugins/ControlTree.js +1 -1
- package/src/sap/ui/core/support/plugins/Interaction.js +1 -1
- package/src/sap/ui/core/support/plugins/LocalStorage.js +1 -1
- package/src/sap/ui/core/support/plugins/Performance.js +1 -1
- package/src/sap/ui/core/support/plugins/Selector.js +1 -1
- package/src/sap/ui/core/support/plugins/TechInfo.js +1 -1
- package/src/sap/ui/core/support/plugins/Trace.js +1 -1
- package/src/sap/ui/core/support/plugins/ViewInfo.js +1 -1
- package/src/sap/ui/core/themes/base/base.less +1644 -97
- package/src/sap/ui/core/themes/base/global.less +1 -0
- package/src/sap/ui/core/themes/base/shared.less +1 -0
- package/src/sap/ui/core/themes/sap_hcb/global.less +1 -0
- package/src/sap/ui/core/tmpl/DOMAttribute.js +1 -1
- package/src/sap/ui/core/tmpl/DOMElement.js +1 -1
- package/src/sap/ui/core/tmpl/HandlebarsTemplate.js +1 -1
- package/src/sap/ui/core/tmpl/Template.js +1 -1
- package/src/sap/ui/core/tmpl/TemplateControl.js +1 -1
- package/src/sap/ui/core/util/AsyncHintsHelper.js +1 -1
- package/src/sap/ui/core/util/Export.js +1 -1
- package/src/sap/ui/core/util/ExportCell.js +1 -1
- package/src/sap/ui/core/util/ExportColumn.js +1 -1
- package/src/sap/ui/core/util/ExportRow.js +1 -1
- package/src/sap/ui/core/util/ExportType.js +1 -1
- package/src/sap/ui/core/util/ExportTypeCSV.js +1 -1
- package/src/sap/ui/core/util/File.js +1 -1
- package/src/sap/ui/core/util/LibraryInfo.js +1 -1
- package/src/sap/ui/core/util/MockServer.js +1 -1
- package/src/sap/ui/core/util/PasteHelper.js +1 -1
- package/src/sap/ui/core/util/serializer/HTMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/Serializer.js +1 -1
- package/src/sap/ui/core/util/serializer/ViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/XMLViewSerializer.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/Delegate.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/HTML.js +1 -1
- package/src/sap/ui/core/util/serializer/delegate/XML.js +1 -1
- package/src/sap/ui/core/ws/ReadyState.js +1 -1
- package/src/sap/ui/core/ws/SapPcpWebSocket.js +1 -1
- package/src/sap/ui/core/ws/WebSocket.js +1 -1
- package/src/sap/ui/debug/ControlTree.js +1 -1
- package/src/sap/ui/debug/DebugEnv.js +1 -1
- package/src/sap/ui/debug/PropertyList.js +1 -1
- package/src/sap/ui/model/ClientModel.js +1 -1
- package/src/sap/ui/model/CompositeDataState.js +1 -1
- package/src/sap/ui/model/CompositeType.js +1 -1
- package/src/sap/ui/model/DataState.js +1 -1
- package/src/sap/ui/model/MetaModel.js +1 -1
- package/src/sap/ui/model/Model.js +1 -1
- package/src/sap/ui/model/SelectionModel.js +1 -1
- package/src/sap/ui/model/SimpleType.js +1 -1
- package/src/sap/ui/model/TreeAutoExpandMode.js +1 -1
- package/src/sap/ui/model/Type.js +1 -1
- package/src/sap/ui/model/analytics/AnalyticalTreeBindingAdapter.js +28 -33
- package/src/sap/ui/model/json/JSONModel.js +1 -1
- package/src/sap/ui/model/message/MessageModel.js +1 -1
- package/src/sap/ui/model/odata/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/ODataMessageParser.js +1 -1
- package/src/sap/ui/model/odata/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/ODataMetadata.js +1 -1
- package/src/sap/ui/model/odata/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/type/Boolean.js +1 -1
- package/src/sap/ui/model/odata/type/Byte.js +1 -1
- package/src/sap/ui/model/odata/type/Currency.js +1 -1
- package/src/sap/ui/model/odata/type/Date.js +1 -1
- package/src/sap/ui/model/odata/type/DateTime.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeBase.js +1 -1
- package/src/sap/ui/model/odata/type/DateTimeOffset.js +1 -1
- package/src/sap/ui/model/odata/type/Decimal.js +1 -1
- package/src/sap/ui/model/odata/type/Double.js +1 -1
- package/src/sap/ui/model/odata/type/Guid.js +1 -1
- package/src/sap/ui/model/odata/type/Int.js +1 -1
- package/src/sap/ui/model/odata/type/Int16.js +1 -1
- package/src/sap/ui/model/odata/type/Int32.js +1 -1
- package/src/sap/ui/model/odata/type/Int64.js +1 -1
- package/src/sap/ui/model/odata/type/ODataType.js +1 -1
- package/src/sap/ui/model/odata/type/Raw.js +1 -1
- package/src/sap/ui/model/odata/type/SByte.js +1 -1
- package/src/sap/ui/model/odata/type/Single.js +1 -1
- package/src/sap/ui/model/odata/type/Stream.js +1 -1
- package/src/sap/ui/model/odata/type/String.js +1 -1
- package/src/sap/ui/model/odata/type/Time.js +1 -1
- package/src/sap/ui/model/odata/type/TimeOfDay.js +1 -1
- package/src/sap/ui/model/odata/type/Unit.js +1 -1
- package/src/sap/ui/model/odata/v2/Context.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataAnnotations.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/v2/ODataTreeBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/Context.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataContextBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataListBinding.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataMetaModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataModel.js +1 -1
- package/src/sap/ui/model/odata/v4/ODataPropertyBinding.js +1 -1
- package/src/sap/ui/model/resource/ResourceModel.js +1 -1
- package/src/sap/ui/model/type/Boolean.js +1 -1
- package/src/sap/ui/model/type/Currency.js +1 -1
- package/src/sap/ui/model/type/Date.js +1 -1
- package/src/sap/ui/model/type/DateInterval.js +1 -1
- package/src/sap/ui/model/type/DateTime.js +1 -1
- package/src/sap/ui/model/type/DateTimeInterval.js +1 -1
- package/src/sap/ui/model/type/FileSize.js +1 -1
- package/src/sap/ui/model/type/Float.js +1 -1
- package/src/sap/ui/model/type/Integer.js +1 -1
- package/src/sap/ui/model/type/String.js +1 -1
- package/src/sap/ui/model/type/Time.js +1 -1
- package/src/sap/ui/model/type/TimeInterval.js +1 -1
- package/src/sap/ui/model/type/Unit.js +1 -1
- package/src/sap/ui/model/xml/XMLModel.js +1 -1
- package/src/sap/ui/qunit/utils/ControlIterator.js +1 -1
- package/src/sap/ui/qunit/utils/MemoryLeakCheck.js +1 -1
- package/src/sap/ui/util/Storage.js +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Provides type sap.ui.core.date.CalendarUtils.
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
"sap/ui/core/date/CalendarWeekNumbering",
|
|
10
|
+
"sap/ui/core/LocaleData"
|
|
11
|
+
], function(
|
|
12
|
+
CalendarWeekNumbering,
|
|
13
|
+
LocaleData
|
|
14
|
+
) {
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
var mWeekNumberingConfiguration = {
|
|
18
|
+
ISO_8601 : {
|
|
19
|
+
firstDayOfWeek : 1,
|
|
20
|
+
minimalDaysInFirstWeek : 4
|
|
21
|
+
},
|
|
22
|
+
MiddleEastern : {
|
|
23
|
+
firstDayOfWeek : 6,
|
|
24
|
+
minimalDaysInFirstWeek : 1
|
|
25
|
+
},
|
|
26
|
+
WesternTraditional : {
|
|
27
|
+
firstDayOfWeek : 0,
|
|
28
|
+
minimalDaysInFirstWeek : 1
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Provides calendar-related utilities.
|
|
34
|
+
*
|
|
35
|
+
* Note: This API has been introduced with version 1.108 and downported to this release with
|
|
36
|
+
* patch level 15.
|
|
37
|
+
*
|
|
38
|
+
* @namespace
|
|
39
|
+
* @alias module:sap/ui/core/date/CalendarUtils
|
|
40
|
+
* @public
|
|
41
|
+
* @since 1.96.15
|
|
42
|
+
*/
|
|
43
|
+
var CalendarUtils = {
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Resolves calendar week configuration.
|
|
47
|
+
*
|
|
48
|
+
* Returns an object with the following fields:
|
|
49
|
+
* <ul>
|
|
50
|
+
* <li><code>firstDayOfWeek</code>: specifies the first day of the week starting with
|
|
51
|
+
* <code>0</code> (which is Sunday)</li>
|
|
52
|
+
* <li><code>minimalDaysInFirstWeek</code>: minimal days at the beginning of the year
|
|
53
|
+
* which define the first calendar week</li>
|
|
54
|
+
* </ul>
|
|
55
|
+
*
|
|
56
|
+
* Note: This API has been introduced with version 1.108 and downported to this release with
|
|
57
|
+
* patch level 15.
|
|
58
|
+
*
|
|
59
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering=Default]
|
|
60
|
+
* The calendar week numbering; if omitted, <code>Default</code> is used.
|
|
61
|
+
* @param {sap.ui.core.Locale} [oLocale]
|
|
62
|
+
* The locale to use; if not provided, this falls back to the format locale from the
|
|
63
|
+
* Configuration; see {@link sap.ui.core.Configuration.FormatSettings#getFormatLocale}.
|
|
64
|
+
* Is only used when <code>sCalendarWeekNumbering</code> is set to <code>Default</code>.
|
|
65
|
+
* @returns {{firstDayOfWeek: int, minimalDaysInFirstWeek: int}|undefined}
|
|
66
|
+
* The calendar week configuration, or <code>undefined<code> for an invalid value of
|
|
67
|
+
* <code>sap.ui.core.date.CalendarWeekNumbering</code>.
|
|
68
|
+
* @public
|
|
69
|
+
* @since 1.96.15
|
|
70
|
+
*/
|
|
71
|
+
getWeekConfigurationValues : function (sCalendarWeekNumbering, oLocale) {
|
|
72
|
+
var oLocaleData;
|
|
73
|
+
|
|
74
|
+
if (mWeekNumberingConfiguration.hasOwnProperty(sCalendarWeekNumbering)) {
|
|
75
|
+
return mWeekNumberingConfiguration[sCalendarWeekNumbering];
|
|
76
|
+
}
|
|
77
|
+
sCalendarWeekNumbering = sCalendarWeekNumbering || CalendarWeekNumbering.Default;
|
|
78
|
+
if (sCalendarWeekNumbering === CalendarWeekNumbering.Default) {
|
|
79
|
+
oLocale = oLocale ||
|
|
80
|
+
sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
|
|
81
|
+
oLocaleData = LocaleData.getInstance(oLocale);
|
|
82
|
+
return {
|
|
83
|
+
firstDayOfWeek : oLocaleData.getFirstDayOfWeek(),
|
|
84
|
+
minimalDaysInFirstWeek : oLocaleData.getMinimalDaysInFirstWeek()
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
return CalendarUtils;
|
|
92
|
+
});
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Provides type sap.ui.core.date.CalendarWeekNumbering.
|
|
8
|
+
sap.ui.define([], function() {
|
|
9
|
+
"use strict";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The <code>CalendarWeekNumbering</code> enum defines how to calculate calendar weeks. Each
|
|
13
|
+
* value defines:
|
|
14
|
+
* <ul>
|
|
15
|
+
* <li>The first day of the week,</li>
|
|
16
|
+
* <li>the first week of the year.</li>
|
|
17
|
+
* </ul>
|
|
18
|
+
*
|
|
19
|
+
* Note: This API has been introduced with version 1.108 and downported to this release with
|
|
20
|
+
* patch level 15.
|
|
21
|
+
*
|
|
22
|
+
* @enum {string}
|
|
23
|
+
* @public
|
|
24
|
+
* @since 1.96.15
|
|
25
|
+
* @alias sap.ui.core.date.CalendarWeekNumbering
|
|
26
|
+
*/
|
|
27
|
+
var CalendarWeekNumbering = {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The default calendar week numbering:
|
|
31
|
+
*
|
|
32
|
+
* The framework determines the week numbering scheme; currently it is derived from the
|
|
33
|
+
* active format locale. Future versions of UI5 might select a different week numbering
|
|
34
|
+
* scheme.
|
|
35
|
+
*
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
Default : "Default",
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Official calendar week numbering in most of Europe (ISO 8601 standard):
|
|
42
|
+
* <ul>
|
|
43
|
+
* <li>Monday is first day of the week,
|
|
44
|
+
* <li>the week containing January 4th is first week of the year.
|
|
45
|
+
* </ul>
|
|
46
|
+
*
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
ISO_8601 : "ISO_8601",
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Official calendar week numbering in much of the Middle East (Middle Eastern calendar):
|
|
53
|
+
* <ul>
|
|
54
|
+
* <li>Saturday is first day of the week,
|
|
55
|
+
* <li>the week containing January 1st is first week of the year.
|
|
56
|
+
* </ul>
|
|
57
|
+
*
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
MiddleEastern : "MiddleEastern",
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Official calendar week numbering in the United States, Canada, Brazil, Israel, Japan, and
|
|
64
|
+
* other countries (Western traditional calendar):
|
|
65
|
+
* <ul>
|
|
66
|
+
* <li>Sunday is first day of the week,
|
|
67
|
+
* <li>the week containing January 1st is first week of the year.
|
|
68
|
+
* </ul>
|
|
69
|
+
*
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
WesternTraditional : "WesternTraditional"
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return CalendarWeekNumbering;
|
|
76
|
+
}, /* bExport= */ true);
|
|
@@ -230,11 +230,49 @@ sap.ui.define(['./UniversalDate', '../CalendarType', './_Calendars'],
|
|
|
230
230
|
}
|
|
231
231
|
return this._setUTCJapanese(oJapanese);
|
|
232
232
|
};
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Retrieves the calendar week
|
|
236
|
+
*
|
|
237
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation
|
|
238
|
+
* properties, defaults to the formatLocale
|
|
239
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering]
|
|
240
|
+
* calendar week numbering, the default is derived from <code>oLocale</code> but this
|
|
241
|
+
* parameter has precedence over oLocale if both are provided. If calendar week numbering is
|
|
242
|
+
* not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
243
|
+
* @returns {{week: int, year: int}} resulting calendar week, note: week index starts with
|
|
244
|
+
* <code>0</code>, the year is the Gregorian year
|
|
245
|
+
* @private
|
|
246
|
+
* @throws {TypeError} If <code>sCalendarWeekNumbering</code> has an invalid week numbering
|
|
247
|
+
* value
|
|
248
|
+
*/
|
|
249
|
+
Japanese.prototype.getWeek = function(oLocale, sCalendarWeekNumbering) {
|
|
250
|
+
// use the full year of the Gregorian date (this.oDate) because the Japanese constructor is
|
|
251
|
+
// able to calculate the era and emperor year from it.
|
|
252
|
+
return UniversalDate.getWeekByDate(this.sCalendarType, this.oDate.getFullYear(),
|
|
253
|
+
this.getMonth(), this.getDate(), oLocale, sCalendarWeekNumbering);
|
|
235
254
|
};
|
|
236
|
-
|
|
237
|
-
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Retrieves the UTC calendar week
|
|
258
|
+
*
|
|
259
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation
|
|
260
|
+
* properties, defaults to the formatLocale
|
|
261
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering]
|
|
262
|
+
* calendar week numbering, the default is derived from <code>oLocale</code> but this
|
|
263
|
+
* parameter has precedence over oLocale if both are provided. If calendar week numbering is
|
|
264
|
+
* not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
265
|
+
* @returns {{week: int, year: int}} resulting calendar week, note: week index starts with
|
|
266
|
+
* <code>0</code>, the year is the Gregorian year
|
|
267
|
+
* @private
|
|
268
|
+
* @throws {TypeError} If <code>sCalendarWeekNumbering</code> has an invalid week numbering
|
|
269
|
+
* value
|
|
270
|
+
*/
|
|
271
|
+
Japanese.prototype.getUTCWeek = function(oLocale, sCalendarWeekNumbering) {
|
|
272
|
+
// use the full year of the Gregorian date (this.oDate) because the Japanese constructor is
|
|
273
|
+
// able to calculate the era and emperor year from it.
|
|
274
|
+
return UniversalDate.getWeekByDate(this.sCalendarType, this.oDate.getUTCFullYear(),
|
|
275
|
+
this.getUTCMonth(), this.getUTCDate(), oLocale, sCalendarWeekNumbering);
|
|
238
276
|
};
|
|
239
277
|
|
|
240
278
|
_Calendars.set(CalendarType.Japanese, Japanese);
|
|
@@ -5,8 +5,21 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
// Provides class sap.ui.core.date.UniversalDate
|
|
8
|
-
sap.ui.define([
|
|
9
|
-
|
|
8
|
+
sap.ui.define([
|
|
9
|
+
'sap/ui/base/Object',
|
|
10
|
+
'sap/ui/core/Locale',
|
|
11
|
+
'sap/ui/core/LocaleData',
|
|
12
|
+
'./_Calendars',
|
|
13
|
+
'./CalendarUtils',
|
|
14
|
+
'./CalendarWeekNumbering'
|
|
15
|
+
], function(
|
|
16
|
+
BaseObject,
|
|
17
|
+
Locale,
|
|
18
|
+
LocaleData,
|
|
19
|
+
_Calendars,
|
|
20
|
+
CalendarUtils,
|
|
21
|
+
CalendarWeekNumbering
|
|
22
|
+
) {
|
|
10
23
|
"use strict";
|
|
11
24
|
|
|
12
25
|
|
|
@@ -148,18 +161,76 @@ sap.ui.define(['sap/ui/base/Object', 'sap/ui/core/LocaleData', './_Calendars'],
|
|
|
148
161
|
UniversalDate.prototype.setUTCEra = function(iEra) {
|
|
149
162
|
// The default implementation does not support setting the era
|
|
150
163
|
};
|
|
151
|
-
|
|
152
|
-
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Retrieves the calendar week
|
|
167
|
+
*
|
|
168
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
169
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering]
|
|
170
|
+
* calendar week numbering,
|
|
171
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
172
|
+
* If calendar week numbering is not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
173
|
+
* @returns {{week: int, year: int}} resulting calendar week, note: week index starts with <code>0</code>
|
|
174
|
+
* @private
|
|
175
|
+
* @throws {TypeError} If <code>sCalendarWeekNumbering</code> has an invalid week numbering value
|
|
176
|
+
*/
|
|
177
|
+
UniversalDate.prototype.getWeek = function(oLocale, sCalendarWeekNumbering) {
|
|
178
|
+
checkWeekConfig(sCalendarWeekNumbering);
|
|
179
|
+
return UniversalDate.getWeekByDate(this.sCalendarType, this.getFullYear(), this.getMonth(), this.getDate(), oLocale, sCalendarWeekNumbering);
|
|
153
180
|
};
|
|
154
|
-
|
|
155
|
-
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Sets the calendar week
|
|
184
|
+
*
|
|
185
|
+
* @param {{week: int, year: int}} oWeek the calendar week, note: week index starts with <code>0</code>,
|
|
186
|
+
* <code>oWeek.year</code> is optional and defaults to {@link sap.ui.core.date.UniversalDate#getFullYear}
|
|
187
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
188
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering]
|
|
189
|
+
* calendar week numbering,
|
|
190
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
191
|
+
* If calendar week numbering is not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
192
|
+
* @private
|
|
193
|
+
* @throws {TypeError} If <code>sCalendarWeekNumbering</code> has an invalid week numbering value
|
|
194
|
+
*/
|
|
195
|
+
UniversalDate.prototype.setWeek = function(oWeek, oLocale, sCalendarWeekNumbering) {
|
|
196
|
+
checkWeekConfig(sCalendarWeekNumbering);
|
|
197
|
+
var oDate = UniversalDate.getFirstDateOfWeek(this.sCalendarType, oWeek.year || this.getFullYear(), oWeek.week, oLocale, sCalendarWeekNumbering);
|
|
156
198
|
this.setFullYear(oDate.year, oDate.month, oDate.day);
|
|
157
199
|
};
|
|
158
|
-
|
|
159
|
-
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Retrieves the UTC calendar week
|
|
203
|
+
*
|
|
204
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
205
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering]
|
|
206
|
+
* calendar week numbering,
|
|
207
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
208
|
+
* If calendar week numbering is not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
209
|
+
* @returns {{week: int, year: int}} resulting calendar week, note: week index starts with <code>0</code>
|
|
210
|
+
* @private
|
|
211
|
+
* @throws {TypeError} If <code>sCalendarWeekNumbering</code> has an invalid week numbering value
|
|
212
|
+
*/
|
|
213
|
+
UniversalDate.prototype.getUTCWeek = function(oLocale, sCalendarWeekNumbering) {
|
|
214
|
+
checkWeekConfig(sCalendarWeekNumbering);
|
|
215
|
+
return UniversalDate.getWeekByDate(this.sCalendarType, this.getUTCFullYear(), this.getUTCMonth(), this.getUTCDate(), oLocale, sCalendarWeekNumbering);
|
|
160
216
|
};
|
|
161
|
-
|
|
162
|
-
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Sets the UTC calendar week
|
|
220
|
+
*
|
|
221
|
+
* @param {{week: int, year: int}} oWeek the calendar week, note: week index starts with <code>0</code>,
|
|
222
|
+
* <code>oWeek.year</code> is optional and defaults to {@link sap.ui.core.date.UniversalDate#getFullYear}
|
|
223
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used to get the calendar week calculation properties, defaults to the formatLocale
|
|
224
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering]
|
|
225
|
+
* calendar week numbering,
|
|
226
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
227
|
+
* If calendar week numbering is not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
228
|
+
* @private
|
|
229
|
+
* @throws {TypeError} If <code>sCalendarWeekNumbering</code> has an invalid week numbering value
|
|
230
|
+
*/
|
|
231
|
+
UniversalDate.prototype.setUTCWeek = function(oWeek, oLocale, sCalendarWeekNumbering) {
|
|
232
|
+
checkWeekConfig(sCalendarWeekNumbering);
|
|
233
|
+
var oDate = UniversalDate.getFirstDateOfWeek(this.sCalendarType, oWeek.year || this.getFullYear(), oWeek.week, oLocale, sCalendarWeekNumbering);
|
|
163
234
|
this.setUTCFullYear(oDate.year, oDate.month, oDate.day);
|
|
164
235
|
};
|
|
165
236
|
UniversalDate.prototype.getQuarter = function() {
|
|
@@ -202,22 +273,38 @@ sap.ui.define(['sap/ui/base/Object', 'sap/ui/core/LocaleData', './_Calendars'],
|
|
|
202
273
|
*/
|
|
203
274
|
var iMillisecondsInWeek = 7 * 24 * 60 * 60 * 1000;
|
|
204
275
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
276
|
+
/**
|
|
277
|
+
* Retrieves the calendar week for a given date, specified by year, month, and day.
|
|
278
|
+
*
|
|
279
|
+
* @param {string} sCalendarType the calendar type, e.g. <code>"Gregorian"</code>
|
|
280
|
+
* @param {int} iYear year, e.g. <code>2016</code>
|
|
281
|
+
* @param {int} iMonth the month, e.g. <code>2</code>
|
|
282
|
+
* @param {int} iDay the date, e.g. <code>3</code>
|
|
283
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used for the week calculation, if oWeekConfig is not provided (falls back to the formatLocale)
|
|
284
|
+
* e.g. <code>new Locale("de-DE")</code>
|
|
285
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering]
|
|
286
|
+
* calendar week numbering,
|
|
287
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
288
|
+
* If calendar week numbering is not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
289
|
+
* @returns {{week: int, year: int}} resulting calendar week, note: week index starts with <code>0</code>, e.g. <code>{year: 2016, week: 8}</code>
|
|
290
|
+
* @private
|
|
291
|
+
* @throws {TypeError} If <code>sCalendarWeekNumbering</code> has an invalid week numbering value
|
|
292
|
+
*/
|
|
293
|
+
UniversalDate.getWeekByDate = function(sCalendarType, iYear, iMonth, iDay, oLocale, sCalendarWeekNumbering) {
|
|
294
|
+
checkWeekConfig(sCalendarWeekNumbering);
|
|
295
|
+
oLocale = oLocale || sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
|
|
296
|
+
var clDate = this.getClass(sCalendarType);
|
|
297
|
+
var oFirstDay = getFirstDayOfFirstWeek(clDate, iYear, oLocale, sCalendarWeekNumbering);
|
|
298
|
+
var oDate = new clDate(clDate.UTC(iYear, iMonth, iDay));
|
|
299
|
+
var iWeek, iLastYear, iNextYear, oLastFirstDay, oNextFirstDay;
|
|
300
|
+
var bSplitWeek = isSplitWeek(sCalendarWeekNumbering, oLocale);
|
|
301
|
+
if (bSplitWeek) {
|
|
215
302
|
iWeek = calculateWeeks(oFirstDay, oDate);
|
|
216
303
|
} else {
|
|
217
304
|
iLastYear = iYear - 1;
|
|
218
305
|
iNextYear = iYear + 1;
|
|
219
|
-
oLastFirstDay = getFirstDayOfFirstWeek(clDate, iLastYear);
|
|
220
|
-
oNextFirstDay = getFirstDayOfFirstWeek(clDate, iNextYear);
|
|
306
|
+
oLastFirstDay = getFirstDayOfFirstWeek(clDate, iLastYear, oLocale, sCalendarWeekNumbering);
|
|
307
|
+
oNextFirstDay = getFirstDayOfFirstWeek(clDate, iNextYear, oLocale, sCalendarWeekNumbering);
|
|
221
308
|
if (oDate >= oNextFirstDay) {
|
|
222
309
|
iYear = iNextYear;
|
|
223
310
|
iWeek = 0;
|
|
@@ -234,17 +321,30 @@ sap.ui.define(['sap/ui/base/Object', 'sap/ui/core/LocaleData', './_Calendars'],
|
|
|
234
321
|
};
|
|
235
322
|
};
|
|
236
323
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
324
|
+
/**
|
|
325
|
+
* Retrieves the first day's date of the given week in the given year.
|
|
326
|
+
*
|
|
327
|
+
* @param {string} sCalendarType the calendar type, e.g. <code>"Gregorian"</code>
|
|
328
|
+
* @param {int} iYear year, e.g. <code>2016</code>
|
|
329
|
+
* @param {int} iWeek the calendar week index, e.g. <code>8</code>
|
|
330
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used for the week calculation, if oWeekConfig is not provided (falls back to the formatLocale)
|
|
331
|
+
* e.g. <code>new Locale("de-DE")</code>
|
|
332
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering]
|
|
333
|
+
* calendar week numbering,
|
|
334
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
335
|
+
* If calendar week numbering is not determined from the locale then {@link LocaleData#firstDayStartsFirstWeek} is ignored.
|
|
336
|
+
* @returns {{month: int, year: int, day: int}} the resulting date, e.g. <code>{year: 2016, month: 1, day: 29}</code>
|
|
337
|
+
* @private
|
|
338
|
+
* @throws {TypeError} If <code>sCalendarWeekNumbering</code> has an invalid week numbering value
|
|
339
|
+
*/
|
|
340
|
+
UniversalDate.getFirstDateOfWeek = function(sCalendarType, iYear, iWeek, oLocale, sCalendarWeekNumbering) {
|
|
341
|
+
checkWeekConfig(sCalendarWeekNumbering);
|
|
342
|
+
oLocale = oLocale || sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
|
|
343
|
+
var clDate = this.getClass(sCalendarType);
|
|
344
|
+
var oFirstDay = getFirstDayOfFirstWeek(clDate, iYear, oLocale, sCalendarWeekNumbering);
|
|
345
|
+
var oDate = new clDate(oFirstDay.valueOf() + iWeek * iMillisecondsInWeek);
|
|
346
|
+
var bSplitWeek = isSplitWeek(sCalendarWeekNumbering, oLocale);
|
|
347
|
+
if (bSplitWeek && iWeek === 0 && oFirstDay.getUTCFullYear() < iYear) {
|
|
248
348
|
return {
|
|
249
349
|
year: iYear,
|
|
250
350
|
month: 0,
|
|
@@ -258,13 +358,66 @@ sap.ui.define(['sap/ui/base/Object', 'sap/ui/core/LocaleData', './_Calendars'],
|
|
|
258
358
|
};
|
|
259
359
|
};
|
|
260
360
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
361
|
+
/**
|
|
362
|
+
* Determines if the split week algorithm should be applied (the first day of the first calendar
|
|
363
|
+
* week of the year is January 1st).
|
|
364
|
+
*
|
|
365
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering]
|
|
366
|
+
* calendar week numbering
|
|
367
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used for the week calculation
|
|
368
|
+
* @returns {boolean} if the split week should be applied
|
|
369
|
+
* @private
|
|
370
|
+
*/
|
|
371
|
+
function isSplitWeek(sCalendarWeekNumbering, oLocale) {
|
|
372
|
+
oLocale = oLocale || sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
|
|
373
|
+
var oLocaleData = LocaleData.getInstance(oLocale);
|
|
374
|
+
return (!sCalendarWeekNumbering ||
|
|
375
|
+
sCalendarWeekNumbering === CalendarWeekNumbering.Default)
|
|
376
|
+
&& oLocaleData.firstDayStartsFirstWeek();
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Checks the calendar week configuration
|
|
381
|
+
*
|
|
382
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering]
|
|
383
|
+
* calendar week numbering
|
|
384
|
+
* @throws {TypeError} If <code>sCalendarWeekNumbering</code> has an invalid week numbering value
|
|
385
|
+
* @private
|
|
386
|
+
*/
|
|
387
|
+
function checkWeekConfig(sCalendarWeekNumbering) {
|
|
388
|
+
if (sCalendarWeekNumbering && !Object.values(CalendarWeekNumbering).includes(sCalendarWeekNumbering)) {
|
|
389
|
+
throw new TypeError("Illegal format option calendarWeekNumbering: '" + sCalendarWeekNumbering + "'");
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Returns the first day of the first week in the given year.
|
|
395
|
+
*
|
|
396
|
+
* @param {UniversalDate} clDate the date class
|
|
397
|
+
* @param {int} iYear year, e.g. <code>2016</code>
|
|
398
|
+
* @param {sap.ui.core.Locale} [oLocale] the locale used for the week calculation, if oWeekConfig is not provided (falls back to the formatLocale)
|
|
399
|
+
* e.g. <code>new Locale("de-DE")</code>
|
|
400
|
+
* @param {sap.ui.core.date.CalendarWeekNumbering} [sCalendarWeekNumbering]
|
|
401
|
+
* calendar week numbering,
|
|
402
|
+
* the default is derived from <code>oLocale</code> but this parameter has precedence over oLocale if both are provided.
|
|
403
|
+
* @returns {Date} first day of the first week in the given year, e.g. <code>Mon Jan 04 2016 01:00:00 GMT+0100</code>
|
|
404
|
+
* @private
|
|
405
|
+
*/
|
|
406
|
+
function getFirstDayOfFirstWeek(clDate, iYear, oLocale, sCalendarWeekNumbering) {
|
|
407
|
+
oLocale = oLocale || sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale();
|
|
408
|
+
|
|
409
|
+
var oWeekConfig = CalendarUtils.getWeekConfigurationValues(sCalendarWeekNumbering, oLocale);
|
|
410
|
+
var iMinDays = oWeekConfig.minimalDaysInFirstWeek;
|
|
411
|
+
var iFirstDayOfWeek = oWeekConfig.firstDayOfWeek;
|
|
412
|
+
|
|
413
|
+
var oFirstDay = new clDate(clDate.UTC(iYear, 0, 1));
|
|
414
|
+
var iDayCount = 7;
|
|
415
|
+
|
|
416
|
+
if (isNaN(oFirstDay.getTime())) {
|
|
417
|
+
throw new Error("Could not determine the first day of the week, because the date " +
|
|
418
|
+
"object is invalid");
|
|
419
|
+
}
|
|
420
|
+
|
|
268
421
|
// Find the first day of the first week of the year
|
|
269
422
|
while (oFirstDay.getUTCDay() !== iFirstDayOfWeek) {
|
|
270
423
|
oFirstDay.setUTCDate(oFirstDay.getUTCDate() - 1);
|
|
@@ -82,7 +82,7 @@ sap.ui.define([
|
|
|
82
82
|
* @param {Element[]} aItemDomRefs Array of DOM references representing the items for the navigation
|
|
83
83
|
* @param {boolean} [bNotInTabChain=false] Whether the selected element should be in the tab chain or not
|
|
84
84
|
*
|
|
85
|
-
* @version 1.96.
|
|
85
|
+
* @version 1.96.13
|
|
86
86
|
* @alias sap.ui.core.delegate.ItemNavigation
|
|
87
87
|
* @public
|
|
88
88
|
*/
|
|
@@ -58,7 +58,7 @@ sap.ui.define([
|
|
|
58
58
|
*
|
|
59
59
|
* @protected
|
|
60
60
|
* @alias sap.ui.core.delegate.ScrollEnablement
|
|
61
|
-
* @version 1.96.
|
|
61
|
+
* @version 1.96.13
|
|
62
62
|
* @author SAP SE
|
|
63
63
|
*/
|
|
64
64
|
var ScrollEnablement = BaseObject.extend("sap.ui.core.delegate.ScrollEnablement", /** @lends sap.ui.core.delegate.ScrollEnablement.prototype */ {
|