aboutsummaryrefslogtreecommitdiffstats
path: root/functions/parse/end_vevent.php
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2008-12-16 19:48:23 +0000
committerJim Hu <jimhu@users.sourceforge.net>2008-12-16 19:48:23 +0000
commitfd14e5ce0beec32d38078064a865161433f33a06 (patch)
tree1e21f4a4f62f348e55a146634bb01370c21dff71 /functions/parse/end_vevent.php
parentac501f092835e07d6d4683f29824f9b54e7ee162 (diff)
downloadphpicalendar-fd14e5ce0beec32d38078064a865161433f33a06.tar.gz
phpicalendar-fd14e5ce0beec32d38078064a865161433f33a06.tar.bz2
phpicalendar-fd14e5ce0beec32d38078064a865161433f33a06.zip
progress on recurrence
Diffstat (limited to 'functions/parse/end_vevent.php')
-rw-r--r--functions/parse/end_vevent.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/functions/parse/end_vevent.php b/functions/parse/end_vevent.php
index 54c0c9a..a247729 100644
--- a/functions/parse/end_vevent.php
+++ b/functions/parse/end_vevent.php
@@ -228,7 +228,7 @@ $wkst3char = two2threeCharDays($wkst);
/* The while loop below increments $next_range_time by $freq type. For the larger freq types, there is only
one $next_range_time per repeat, but the BYXXX rules may write more than one event in that repeat cycle
$next_date_time handles those instances within a $freq_type */
-echo "<pre>$summary\n\tstart mArray time:".date("Ymd his",$mArray_begin)."\n\tstart range time:".date("Ymd his",$next_range_unixtime)."\n\tend range time ".date("Ymd his",$end_range_unixtime)."\n";
+#echo "<pre>$summary\n\tstart mArray time:".date("Ymd his",$mArray_begin)."\n\tstart range time:".date("Ymd his",$next_range_unixtime)."\n\tend range time ".date("Ymd his",$end_range_unixtime)."\n";
$recur_data = array();
while ($next_range_unixtime <= $end_range_unixtime && $count > 0) {
$year = date('Y', $next_range_unixtime);
@@ -237,6 +237,7 @@ while ($next_range_unixtime <= $end_range_unixtime && $count > 0) {
# $diff is the number of occurrences between start_date and next_range_time
$func = $freq_type.'Compare';
$diff = $func(date('Ymd',$next_range_time), $start_date);
+ $time = mktime(12,0,0,$month,date("d",$start_unixtime),$year);
switch ($freq_type){
case 'day':
add_recur($next_range_unixtime);
@@ -245,17 +246,16 @@ while ($next_range_unixtime <= $end_range_unixtime && $count > 0) {
add_recur(expand_byday($next_range_unixtime));
break;
case 'month':
- $time = mktime(12,0,0,$month,date("d",$start_unixtime),$year);
$times = expand_bymonthday(array($time));
foreach($times as $time){
add_recur(expand_byday($time));
}
break;
case 'year':
- $times = expand_bymonth($next_range_unixtime);
- $times = expand_byweekno($times);
- $times = expand_byyearday($times);
- $times = expand_bymonthday($times);
+ $times = expand_bymonth($time); #echo "exp bymonth";dump_times($times);
+ $times = expand_byweekno($times); #echo "exp bymonth";dump_times($times);
+ $times = expand_byyearday($times); #echo "exp bymonth";dump_times($times);
+ $times = expand_bymonthday($times); #echo "exp bymonthday";dump_times($times);
foreach($times as $time){
add_recur(expand_byday($time));
}
@@ -264,7 +264,7 @@ while ($next_range_unixtime <= $end_range_unixtime && $count > 0) {
add_recur($start_unixtime);
break 2;
}
- $next_range_unixtime = strtotime('+'.$interval.' '.$freq_type, $next_range_unixtime); echo "\nnext $interval $freq_type".date("Ymd",$next_range_unixtime)."\n";
+ $next_range_unixtime = strtotime('+'.$interval.' '.$freq_type, $next_range_unixtime); #echo "\nnext $interval $freq_type".date("Ymd",$next_range_unixtime)."\n";
} #end while loop
sort($recur_data);

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