aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2004-05-10 19:09:54 +0000
committerChad Little <clittle@users.sourceforge.net>2004-05-10 19:09:54 +0000
commit90b19dd5719f0fda0adbc8022ab153e197e32d91 (patch)
tree2dd8546a89a4d531e67561c7074629c5b76177a6 /functions
parent3494f2f872e372f6f96ebaa58ef4183fc33a562c (diff)
downloadphpicalendar-90b19dd5719f0fda0adbc8022ab153e197e32d91.tar.gz
phpicalendar-90b19dd5719f0fda0adbc8022ab153e197e32d91.tar.bz2
phpicalendar-90b19dd5719f0fda0adbc8022ab153e197e32d91.zip
Fix for byday in monthly.
Diffstat (limited to 'functions')
-rw-r--r--functions/ical_parser.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/functions/ical_parser.php b/functions/ical_parser.php
index aded636..1aaa4ca 100644
--- a/functions/ical_parser.php
+++ b/functions/ical_parser.php
@@ -482,7 +482,12 @@ foreach ($cal_filelist as $filename) {
} else {
foreach($byday as $day) {
ereg ('([-\+]{0,1})?([0-9]{1})?([A-Z]{2})', $day, $byday_arr);
- $nth = $byday_arr[2]-1;
+ //Added for 2.0 when no modifier is set
+ if ($byday_arr[2] != '') {
+ $nth = $byday_arr[2]-1;
+ } else {
+ $nth = 0;
+ }
$on_day = two2threeCharDays($byday_arr[3]);
$on_day_num = two2threeCharDays($byday_arr[3],false);
if ((isset($byday_arr[1])) && ($byday_arr[1] == '-')) {
@@ -832,7 +837,6 @@ foreach ($cal_filelist as $filename) {
if ($dtstart_check[1] < 1970) {
$data = '1971'.$dtstart_check[2].$dtstart_check[3];
}
- echo $data.'<br>';
$allday_start = $data;
$start_date = $allday_start;
$start_unixtime = strtotime($data);

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