From a01a3d412c9dff2f3221b0b60307026a027ae5e8 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Thu, 5 Jan 2012 17:53:13 +0100 Subject: [PATCH] fix autodetection for the week of the month --- apps/calendar/lib/object.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php index c834dad0f4b..cbb1badf802 100644 --- a/apps/calendar/lib/object.php +++ b/apps/calendar/lib/object.php @@ -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']; } -- 2.39.5