From 39ec3fe4eef2c2cd33750016d936d23682cb515e Mon Sep 17 00:00:00 2001 From: jakub-g Date: Tue, 26 Feb 2013 14:56:59 +0100 Subject: [PATCH] refactor remove Date.firstDayOfWeek Supported equivalent is now aria.core.AppEnvironment.firstDayOfWeek --- src/aria/resources/DateRes.js | 1 - src/aria/resources/DateRes_cn_CN.js | 3 +-- src/aria/resources/DateRes_da_DK.js | 1 - src/aria/resources/DateRes_de_DE.js | 1 - src/aria/resources/DateRes_en_GB.js | 1 - src/aria/resources/DateRes_en_US.js | 1 - src/aria/resources/DateRes_es_ES.js | 3 +-- src/aria/resources/DateRes_fi_FI.js | 1 - src/aria/resources/DateRes_fr_FR.js | 1 - src/aria/resources/DateRes_is_IS.js | 3 +-- src/aria/resources/DateRes_it_IT.js | 1 - src/aria/resources/DateRes_ja_JP.js | 3 +-- src/aria/resources/DateRes_ko_KO.js | 1 - src/aria/resources/DateRes_nl_NL.js | 1 - src/aria/resources/DateRes_no_NO.js | 1 - src/aria/resources/DateRes_pl_PL.js | 1 - src/aria/resources/DateRes_pt_BR.js | 1 - src/aria/resources/DateRes_pt_PT.js | 1 - src/aria/resources/DateRes_ru_RU.js | 1 - src/aria/resources/DateRes_sp_AR.js | 3 +-- src/aria/resources/DateRes_sv_SE.js | 1 - src/aria/resources/DateRes_th_TH.js | 1 - src/aria/resources/DateRes_tk_TK.js | 1 - src/aria/resources/DateRes_tr_TR.js | 3 +-- src/aria/resources/DateRes_tw_TW.js | 1 - src/aria/utils/Date.js | 13 +------------ src/aria/utils/environment/Date.js | 21 ++------------------- 27 files changed, 9 insertions(+), 62 deletions(-) diff --git a/src/aria/resources/DateRes.js b/src/aria/resources/DateRes.js index 288362fac..9abd83251 100644 --- a/src/aria/resources/DateRes.js +++ b/src/aria/resources/DateRes.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Sunday", "Monday", diff --git a/src/aria/resources/DateRes_cn_CN.js b/src/aria/resources/DateRes_cn_CN.js index 0b786362d..b8436010d 100644 --- a/src/aria/resources/DateRes_cn_CN.js +++ b/src/aria/resources/DateRes_cn_CN.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "星期日", "星期一", @@ -45,4 +44,4 @@ Aria.resourcesDefinition({ "十二月" ] } -}); \ No newline at end of file +}); diff --git a/src/aria/resources/DateRes_da_DK.js b/src/aria/resources/DateRes_da_DK.js index c7e141e16..003355789 100644 --- a/src/aria/resources/DateRes_da_DK.js +++ b/src/aria/resources/DateRes_da_DK.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "S\u00F8ndag", "Mandag", diff --git a/src/aria/resources/DateRes_de_DE.js b/src/aria/resources/DateRes_de_DE.js index 5d1d8194a..135874f25 100644 --- a/src/aria/resources/DateRes_de_DE.js +++ b/src/aria/resources/DateRes_de_DE.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Sonntag", "Montag", diff --git a/src/aria/resources/DateRes_en_GB.js b/src/aria/resources/DateRes_en_GB.js index 288362fac..9abd83251 100644 --- a/src/aria/resources/DateRes_en_GB.js +++ b/src/aria/resources/DateRes_en_GB.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Sunday", "Monday", diff --git a/src/aria/resources/DateRes_en_US.js b/src/aria/resources/DateRes_en_US.js index 288362fac..9abd83251 100644 --- a/src/aria/resources/DateRes_en_US.js +++ b/src/aria/resources/DateRes_en_US.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Sunday", "Monday", diff --git a/src/aria/resources/DateRes_es_ES.js b/src/aria/resources/DateRes_es_ES.js index e0594252f..6ae49da1f 100644 --- a/src/aria/resources/DateRes_es_ES.js +++ b/src/aria/resources/DateRes_es_ES.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Domingo", "Lunes", @@ -66,4 +65,4 @@ uic.r.shortdate.thu=Ju uic.r.shortdate.fri=Vi uic.r.shortdate.sat=S\u00E2 uic.r.shortdate.sun=Do -*/ \ No newline at end of file +*/ diff --git a/src/aria/resources/DateRes_fi_FI.js b/src/aria/resources/DateRes_fi_FI.js index 082fa84e4..5f4cab55d 100644 --- a/src/aria/resources/DateRes_fi_FI.js +++ b/src/aria/resources/DateRes_fi_FI.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Sunnuntai", "Maanantai", diff --git a/src/aria/resources/DateRes_fr_FR.js b/src/aria/resources/DateRes_fr_FR.js index fa7d02ce2..d0747ee22 100644 --- a/src/aria/resources/DateRes_fr_FR.js +++ b/src/aria/resources/DateRes_fr_FR.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 1 /* Monday */, day : [ "Dimanche", "Lundi", diff --git a/src/aria/resources/DateRes_is_IS.js b/src/aria/resources/DateRes_is_IS.js index 18d11c63c..0899a3baa 100644 --- a/src/aria/resources/DateRes_is_IS.js +++ b/src/aria/resources/DateRes_is_IS.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "sunnudagur", "m\u00E1nudagur", @@ -45,4 +44,4 @@ Aria.resourcesDefinition({ "desember" ] } -}); \ No newline at end of file +}); diff --git a/src/aria/resources/DateRes_it_IT.js b/src/aria/resources/DateRes_it_IT.js index c16d975d6..32a3aad9c 100644 --- a/src/aria/resources/DateRes_it_IT.js +++ b/src/aria/resources/DateRes_it_IT.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Domenica", "Luned\u00EC", diff --git a/src/aria/resources/DateRes_ja_JP.js b/src/aria/resources/DateRes_ja_JP.js index 64533709c..5819a45b2 100644 --- a/src/aria/resources/DateRes_ja_JP.js +++ b/src/aria/resources/DateRes_ja_JP.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "日曜日", "月曜日", @@ -45,4 +44,4 @@ Aria.resourcesDefinition({ "十二月" ] } -}); \ No newline at end of file +}); diff --git a/src/aria/resources/DateRes_ko_KO.js b/src/aria/resources/DateRes_ko_KO.js index 63ae7b292..e074f2cb5 100644 --- a/src/aria/resources/DateRes_ko_KO.js +++ b/src/aria/resources/DateRes_ko_KO.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "일요일", "월요일", diff --git a/src/aria/resources/DateRes_nl_NL.js b/src/aria/resources/DateRes_nl_NL.js index d3ba0bd18..1a1ad62a5 100644 --- a/src/aria/resources/DateRes_nl_NL.js +++ b/src/aria/resources/DateRes_nl_NL.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "zondag", "maandag", diff --git a/src/aria/resources/DateRes_no_NO.js b/src/aria/resources/DateRes_no_NO.js index 877742eb9..5f4b799c1 100644 --- a/src/aria/resources/DateRes_no_NO.js +++ b/src/aria/resources/DateRes_no_NO.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "s\u00F8ndag", "mandag", diff --git a/src/aria/resources/DateRes_pl_PL.js b/src/aria/resources/DateRes_pl_PL.js index 0546cee3a..76a11c039 100644 --- a/src/aria/resources/DateRes_pl_PL.js +++ b/src/aria/resources/DateRes_pl_PL.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Niedziela", "Poniedzia\u0142ek", diff --git a/src/aria/resources/DateRes_pt_BR.js b/src/aria/resources/DateRes_pt_BR.js index 1f9387312..1005f56da 100644 --- a/src/aria/resources/DateRes_pt_BR.js +++ b/src/aria/resources/DateRes_pt_BR.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Domingo", "Segunda-feira", diff --git a/src/aria/resources/DateRes_pt_PT.js b/src/aria/resources/DateRes_pt_PT.js index 1d24a4090..87fe0f5b4 100644 --- a/src/aria/resources/DateRes_pt_PT.js +++ b/src/aria/resources/DateRes_pt_PT.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Domingo", "Segunda-feira", diff --git a/src/aria/resources/DateRes_ru_RU.js b/src/aria/resources/DateRes_ru_RU.js index 1362102d5..32229888b 100644 --- a/src/aria/resources/DateRes_ru_RU.js +++ b/src/aria/resources/DateRes_ru_RU.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Воскресенье", "Понедельник", diff --git a/src/aria/resources/DateRes_sp_AR.js b/src/aria/resources/DateRes_sp_AR.js index 8d43103ca..b0b43d6dc 100644 --- a/src/aria/resources/DateRes_sp_AR.js +++ b/src/aria/resources/DateRes_sp_AR.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "الأحد", "الاثنين", @@ -65,4 +64,4 @@ uic.r.shortdate.wed=We uic.r.shortdate.thu=Th uic.r.shortdate.fri=Fr uic.r.shortdate.sat=Sa -uic.r.shortdate.sun=Su*/ \ No newline at end of file +uic.r.shortdate.sun=Su*/ diff --git a/src/aria/resources/DateRes_sv_SE.js b/src/aria/resources/DateRes_sv_SE.js index 4d3fb3b1f..8ce02de6d 100644 --- a/src/aria/resources/DateRes_sv_SE.js +++ b/src/aria/resources/DateRes_sv_SE.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "s\u00F6ndag", "m\u00E5ndag", diff --git a/src/aria/resources/DateRes_th_TH.js b/src/aria/resources/DateRes_th_TH.js index 36905924a..df679722d 100644 --- a/src/aria/resources/DateRes_th_TH.js +++ b/src/aria/resources/DateRes_th_TH.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "วันอาทิตย์", "วันจันทร์", diff --git a/src/aria/resources/DateRes_tk_TK.js b/src/aria/resources/DateRes_tk_TK.js index d7db3ceba..e4cf3e1dc 100644 --- a/src/aria/resources/DateRes_tk_TK.js +++ b/src/aria/resources/DateRes_tk_TK.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Pazar", "Pazartesi", diff --git a/src/aria/resources/DateRes_tr_TR.js b/src/aria/resources/DateRes_tr_TR.js index 99749ecf0..2d2c61e18 100644 --- a/src/aria/resources/DateRes_tr_TR.js +++ b/src/aria/resources/DateRes_tr_TR.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "Pazar", "Pazartesi", @@ -45,4 +44,4 @@ Aria.resourcesDefinition({ "Aral\u00FDk" ] } -}); \ No newline at end of file +}); diff --git a/src/aria/resources/DateRes_tw_TW.js b/src/aria/resources/DateRes_tw_TW.js index 750f3aa43..46672c36d 100644 --- a/src/aria/resources/DateRes_tw_TW.js +++ b/src/aria/resources/DateRes_tw_TW.js @@ -20,7 +20,6 @@ Aria.resourcesDefinition({ $classpath : 'aria.resources.DateRes', $resources : { - firstDayOfWeek : 0 /* Sunday */, day : [ "星期日", "星期一", diff --git a/src/aria/utils/Date.js b/src/aria/utils/Date.js index 2a24ef599..0c91e8545 100644 --- a/src/aria/utils/Date.js +++ b/src/aria/utils/Date.js @@ -42,17 +42,6 @@ Aria.classDefinition({ var res = this.dateRes, env = this._environment, utilString = aria.utils.String, utilRes = this.res; - // Backward compatibility code to be removed, PTR#05579605 - start. - /** - * Deprecated. Please use aria.core.AppEnvironment.setEnvironment or - * aria.utils.environment.Date.getFirstDayOfWeek to set or retrieve this value.
- * First day of the week in the current regional settings (0 = Sunday, ... , 6 = Saturday) - * @type Number - */ - // Take the value which may have already been set in the environment - this.firstDayOfWeek = this._environment.getFirstDayOfWeek(); - // Backward compatibility code to be removed, PTR#05579605 - end. - /** * IATA Months for interpretation * @protected @@ -1775,4 +1764,4 @@ Aria.classDefinition({ return (difference === 0) ? 0 : difference / Math.abs(difference); } } -}); \ No newline at end of file +}); diff --git a/src/aria/utils/environment/Date.js b/src/aria/utils/environment/Date.js index b060df4e1..90ab1e706 100644 --- a/src/aria/utils/environment/Date.js +++ b/src/aria/utils/environment/Date.js @@ -52,24 +52,7 @@ Aria.classDefinition({ * @return {Integer} */ getFirstDayOfWeek : function () { - var firstDayOfWeek = this.checkApplicationSettings("firstDayOfWeek"); - // Backward compatibility code to be removed, PTR#05579605 - start. - if (aria.utils.Date) { - firstDayOfWeek = aria.utils.Date.firstDayOfWeek; - } - // Backward compatibility code to be removed, PTR#05579605 - end. - return firstDayOfWeek; - }, - /** - * Backward compatibility code to be removed, PTR#05579605 - start. Apply the current environment. - * @param {aria.core.JsObject.Callback} callback Will be called after the environment is applied. - * @override - */ - _applyEnvironment : function (callback) { - if (aria.utils.Date) { - aria.utils.Date.firstDayOfWeek = this.checkApplicationSettings("firstDayOfWeek"); - } - this.$callback(callback); + return this.checkApplicationSettings("firstDayOfWeek"); } } -}); \ No newline at end of file +});