aboutsummaryrefslogtreecommitdiffstats
path: root/functions/ical_parser.php
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2006-11-02 08:06:03 +0000
committerJim Hu <jimhu@users.sourceforge.net>2006-11-02 08:06:03 +0000
commit09643a5841c1cec29871e0b4d1eb4d6e10108a4b (patch)
tree9bc24cf07a31141ef3f172d2b7cf4128e3859b8d /functions/ical_parser.php
parent956548beab93780c028f79ce0c75d06093306f19 (diff)
downloadphpicalendar-09643a5841c1cec29871e0b4d1eb4d6e10108a4b.tar.gz
phpicalendar-09643a5841c1cec29871e0b4d1eb4d6e10108a4b.tar.bz2
phpicalendar-09643a5841c1cec29871e0b4d1eb4d6e10108a4b.zip
bug fix for repeating events where first day of month is same as repeat day
Diffstat (limited to 'functions/ical_parser.php')
-rw-r--r--functions/ical_parser.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index af1da64..b754d75 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -660,7 +660,7 @@ foreach ($cal_filelist as $cal_key=>$filename) {
$last_day_tmp = date('t',$next_range_time);
$next_range_time = strtotime(date('Y-m-'.$last_day_tmp, $next_range_time));
$last_tmp = (date('w',$next_range_time) == $on_day_num) ? '' : 'last ';
- $next_date_time = strtotime($last_tmp.$on_day.' -'.$nth.' week', $next_range_time);
+ $next_date_time = strtotime($last_tmp.$on_day, $next_range_time) - $nth * 604800;
$month = date('m', $next_date_time);
if (in_array($month, $bymonth)) {
$recur_data[] = $next_date_time;
@@ -682,7 +682,7 @@ foreach ($cal_filelist as $cal_key=>$filename) {
}
}
} elseif ((isset($byday_arr[1])) && ($byday_arr[1] != '-')) {
- $next_date_time = strtotime($on_day.' +'.$nth.' week', $next_range_time);
+ $next_date_time = strtotime($on_day, $next_range_time) + $nth * 604800;
$month = date('m', $next_date_time);
if (in_array($month, $bymonth)) {
$recur_data[] = $next_date_time;

© 2014-2024 Faster IT GmbH | imprint | privacy policy