]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix autodetection for the week of the month
authorGeorg Ehrke <dev@georgswebsite.de>
Thu, 5 Jan 2012 16:53:13 +0000 (17:53 +0100)
committerGeorg Ehrke <dev@georgswebsite.de>
Thu, 5 Jan 2012 16:53:13 +0000 (17:53 +0100)
apps/calendar/lib/object.php

index c834dad0f4baa31307efbbb9c52dd8186c578f50..cbb1badf80210432626e468acb25e351135528bf 100644 (file)
@@ -683,7 +683,8 @@ class OC_Calendar_Object{
                                                break;
                                        }elseif($request['advanced_month_select'] == 'weekday'){
                                                if($request['weekofmonthoptions'] == 'auto'){
-                                                       $weekofmonth = floor($request['weekofmonthoptions']/7);
+                                                       list($_day, $_month, $_year) = explode('-', $from);
+                                                       $weekofmonth = floor($_day/7);
                                                }else{
                                                        $weekofmonth = $request['weekofmonthoptions'];
                                                }