Skip to content

Commit

Permalink
refactor remove Date.firstDayOfWeek
Browse files Browse the repository at this point in the history
Supported equivalent is now aria.core.AppEnvironment.firstDayOfWeek
  • Loading branch information
jakub-g committed Mar 21, 2013
1 parent 9259ebc commit 39ec3fe
Show file tree
Hide file tree
Showing 27 changed files with 9 additions and 62 deletions.
1 change: 0 additions & 1 deletion src/aria/resources/DateRes.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Sunday", "Sunday",
"Monday", "Monday",
Expand Down
3 changes: 1 addition & 2 deletions src/aria/resources/DateRes_cn_CN.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"星期日", "星期日",
"星期一", "星期一",
Expand All @@ -45,4 +44,4 @@ Aria.resourcesDefinition({
"十二月" "十二月"
] ]
} }
}); });
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_da_DK.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"S\u00F8ndag", "S\u00F8ndag",
"Mandag", "Mandag",
Expand Down
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_de_DE.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Sonntag", "Sonntag",
"Montag", "Montag",
Expand Down
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_en_GB.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Sunday", "Sunday",
"Monday", "Monday",
Expand Down
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_en_US.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Sunday", "Sunday",
"Monday", "Monday",
Expand Down
3 changes: 1 addition & 2 deletions src/aria/resources/DateRes_es_ES.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Domingo", "Domingo",
"Lunes", "Lunes",
Expand Down Expand Up @@ -66,4 +65,4 @@ uic.r.shortdate.thu=Ju
uic.r.shortdate.fri=Vi uic.r.shortdate.fri=Vi
uic.r.shortdate.sat=S\u00E2 uic.r.shortdate.sat=S\u00E2
uic.r.shortdate.sun=Do uic.r.shortdate.sun=Do
*/ */
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_fi_FI.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Sunnuntai", "Sunnuntai",
"Maanantai", "Maanantai",
Expand Down
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_fr_FR.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 1 /* Monday */,
day : [ day : [
"Dimanche", "Dimanche",
"Lundi", "Lundi",
Expand Down
3 changes: 1 addition & 2 deletions src/aria/resources/DateRes_is_IS.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"sunnudagur", "sunnudagur",
"m\u00E1nudagur", "m\u00E1nudagur",
Expand All @@ -45,4 +44,4 @@ Aria.resourcesDefinition({
"desember" "desember"
] ]
} }
}); });
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_it_IT.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Domenica", "Domenica",
"Luned\u00EC", "Luned\u00EC",
Expand Down
3 changes: 1 addition & 2 deletions src/aria/resources/DateRes_ja_JP.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"日曜日", "日曜日",
"月曜日", "月曜日",
Expand All @@ -45,4 +44,4 @@ Aria.resourcesDefinition({
"十二月" "十二月"
] ]
} }
}); });
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_ko_KO.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"일요일", "일요일",
"월요일", "월요일",
Expand Down
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_nl_NL.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"zondag", "zondag",
"maandag", "maandag",
Expand Down
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_no_NO.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"s\u00F8ndag", "s\u00F8ndag",
"mandag", "mandag",
Expand Down
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_pl_PL.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Niedziela", "Niedziela",
"Poniedzia\u0142ek", "Poniedzia\u0142ek",
Expand Down
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_pt_BR.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Domingo", "Domingo",
"Segunda-feira", "Segunda-feira",
Expand Down
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_pt_PT.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Domingo", "Domingo",
"Segunda-feira", "Segunda-feira",
Expand Down
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_ru_RU.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Воскресенье", "Воскресенье",
"Понедельник", "Понедельник",
Expand Down
3 changes: 1 addition & 2 deletions src/aria/resources/DateRes_sp_AR.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"الأحد", "الأحد",
"الاثنين", "الاثنين",
Expand Down Expand Up @@ -65,4 +64,4 @@ uic.r.shortdate.wed=We
uic.r.shortdate.thu=Th uic.r.shortdate.thu=Th
uic.r.shortdate.fri=Fr uic.r.shortdate.fri=Fr
uic.r.shortdate.sat=Sa uic.r.shortdate.sat=Sa
uic.r.shortdate.sun=Su*/ uic.r.shortdate.sun=Su*/
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_sv_SE.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"s\u00F6ndag", "s\u00F6ndag",
"m\u00E5ndag", "m\u00E5ndag",
Expand Down
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_th_TH.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"วันอาทิตย์", "วันอาทิตย์",
"วันจันทร์", "วันจันทร์",
Expand Down
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_tk_TK.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Pazar", "Pazar",
"Pazartesi", "Pazartesi",
Expand Down
3 changes: 1 addition & 2 deletions src/aria/resources/DateRes_tr_TR.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"Pazar", "Pazar",
"Pazartesi", "Pazartesi",
Expand All @@ -45,4 +44,4 @@ Aria.resourcesDefinition({
"Aral\u00FDk" "Aral\u00FDk"
] ]
} }
}); });
1 change: 0 additions & 1 deletion src/aria/resources/DateRes_tw_TW.js
Expand Up @@ -20,7 +20,6 @@
Aria.resourcesDefinition({ Aria.resourcesDefinition({
$classpath : 'aria.resources.DateRes', $classpath : 'aria.resources.DateRes',
$resources : { $resources : {
firstDayOfWeek : 0 /* Sunday */,
day : [ day : [
"星期日", "星期日",
"星期一", "星期一",
Expand Down
13 changes: 1 addition & 12 deletions src/aria/utils/Date.js
Expand Up @@ -42,17 +42,6 @@ Aria.classDefinition({


var res = this.dateRes, env = this._environment, utilString = aria.utils.String, utilRes = this.res; 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. <br />
* 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 * IATA Months for interpretation
* @protected * @protected
Expand Down Expand Up @@ -1775,4 +1764,4 @@ Aria.classDefinition({
return (difference === 0) ? 0 : difference / Math.abs(difference); return (difference === 0) ? 0 : difference / Math.abs(difference);
} }
} }
}); });
21 changes: 2 additions & 19 deletions src/aria/utils/environment/Date.js
Expand Up @@ -52,24 +52,7 @@ Aria.classDefinition({
* @return {Integer} * @return {Integer}
*/ */
getFirstDayOfWeek : function () { getFirstDayOfWeek : function () {
var firstDayOfWeek = this.checkApplicationSettings("firstDayOfWeek"); return 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);
} }
} }
}); });

0 comments on commit 39ec3fe

Please sign in to comment.