diff options
author | Bart Visscher <bartv@thisnet.nl> | 2011-09-01 22:29:57 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2011-09-01 22:29:57 +0200 |
commit | b7e9e7e777a227154217dfb39896da6a22a12bf7 (patch) | |
tree | e2a9c2d98513ae498bcb3147c6e43c03e67af225 | |
parent | e765e7e9e8517b3b2e7451c8a4d9a77ec60e8a7f (diff) | |
download | nextcloud-server-b7e9e7e777a227154217dfb39896da6a22a12bf7.tar.gz nextcloud-server-b7e9e7e777a227154217dfb39896da6a22a12bf7.zip |
Simplify forward_day and backward_day
-rwxr-xr-x | apps/calendar/js/calendar.js | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js index 00e653d3f03..aa88b9e9278 100755 --- a/apps/calendar/js/calendar.js +++ b/apps/calendar/js/calendar.js @@ -91,27 +91,17 @@ Calendar={ oc_cal_year++; oc_cal_month = 0; oc_cal_dayofmonth = 1; - if(oc_cal_dayofweek == 6) { - oc_cal_dayofweek = 0; - } else { - oc_cal_dayofweek++; - } } else { oc_cal_month++; oc_cal_dayofmonth = 1; - if(oc_cal_dayofweek == 6) { - oc_cal_dayofweek = 0; - } else { - oc_cal_dayofweek++; - } } } else { oc_cal_dayofmonth++; - if(oc_cal_dayofweek == 6) { - oc_cal_dayofweek = 0; - } else { - oc_cal_dayofweek++; - } + } + if(oc_cal_dayofweek == 6) { + oc_cal_dayofweek = 0; + } else { + oc_cal_dayofweek++; } }, @@ -135,27 +125,17 @@ Calendar={ oc_cal_year--; oc_cal_month = 11; oc_cal_dayofmonth = 31 - if(oc_cal_dayofweek == 0) { - oc_cal_dayofweek = 6; - } else { - oc_cal_dayofweek--; - } } else { oc_cal_month--; oc_cal_dayofmonth = cal[oc_cal_month]; - if(oc_cal_dayofweek == 0) { - oc_cal_dayofweek = 6; - } else { - oc_cal_dayofweek--; - } } } else { oc_cal_dayofmonth--; - if(oc_cal_dayofweek == 0) { - oc_cal_dayofweek = 6; - } else { - oc_cal_dayofweek--; - } + } + if(oc_cal_dayofweek == 0) { + oc_cal_dayofweek = 6; + } else { + oc_cal_dayofweek--; } }, |