diff options
author | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-18 09:22:23 +0000 |
---|---|---|
committer | Jim Hu <jimhu@users.sourceforge.net> | 2008-12-18 09:22:23 +0000 |
commit | fc4ef652b9565c913a805c3f4010cd1c95476196 (patch) | |
tree | 823dc7bb4222c980e3f3d7573c2639f4f6d06b88 /functions/parse/end_vevent.php | |
parent | c11f05eba87d73124d3afa2dfa607d0ca0857bd4 (diff) | |
download | phpicalendar-fc4ef652b9565c913a805c3f4010cd1c95476196.tar.gz phpicalendar-fc4ef652b9565c913a805c3f4010cd1c95476196.tar.bz2 phpicalendar-fc4ef652b9565c913a805c3f4010cd1c95476196.zip |
recurrence changes, add recur_tests calendars subdirectory, fix cpath
Diffstat (limited to 'functions/parse/end_vevent.php')
-rw-r--r-- | functions/parse/end_vevent.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/functions/parse/end_vevent.php b/functions/parse/end_vevent.php index eb78ee3..88f94fa 100644 --- a/functions/parse/end_vevent.php +++ b/functions/parse/end_vevent.php @@ -242,7 +242,7 @@ $next_date_time handles those instances within a $freq_type */ #echo "<pre>$summary\n\tstart mArray time:".date("Ymd his",$mArray_begin)."\n\tnext_range_unixtime:".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); + $year = date("Y", $next_range_unixtime); $month = date('m', $next_range_unixtime); $time = mktime(12,0,0,$month,date("d",$start_unixtime),$year); switch ($freq_type){ @@ -253,16 +253,17 @@ while ($next_range_unixtime <= $end_range_unixtime && $count > 0) { add_recur(expand_byday($next_range_unixtime)); break; case 'month': - $times = expand_bymonthday(array($time)); + if(!empty($bymonthday)) $time = mktime(12,0,0,$month,1,$year); + $times = expand_bymonthday(array($time));#echo "\n $month exp bymonthday";dump_times($times); foreach($times as $time){ add_recur(expand_byday($time)); } break; case 'year': $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); + $times = expand_byweekno($times); #echo "exp byweekno";dump_times($times); + $times = expand_byyearday($times); #echo "exp byyearday";dump_times($times); + $times = expand_bymonthday($times); #echo "\nexp bymonthday";dump_times($times); foreach($times as $time){ add_recur(expand_byday($time)); } |