aboutsummaryrefslogtreecommitdiffstats
path: root/ical_parser.php
diff options
context:
space:
mode:
authorjwangen <jwangen>2002-09-29 09:12:14 +0000
committerjwangen <jwangen>2002-09-29 09:12:14 +0000
commit1fbd3ea870c2a5f41fa68fc611241bc46efb9c9a (patch)
tree52766032be7b397d102da5008dd8995f56c03f3d /ical_parser.php
parent17097c077bff00e844befa28080496d5365b519a (diff)
downloadphpicalendar-1fbd3ea870c2a5f41fa68fc611241bc46efb9c9a.tar.gz
phpicalendar-1fbd3ea870c2a5f41fa68fc611241bc46efb9c9a.tar.bz2
phpicalendar-1fbd3ea870c2a5f41fa68fc611241bc46efb9c9a.zip
New week.php. Born from the new day.php. Still needs work but it's
working in it's current form. ical_parser now loads 3 months worth of recurring data into the array. week-old is the old week.php, in case we need to go back to the older version or cross check it with the new one.
Diffstat (limited to 'ical_parser.php')
-rw-r--r--ical_parser.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/ical_parser.php b/ical_parser.php
index a640905..2468140 100644
--- a/ical_parser.php
+++ b/ical_parser.php
@@ -239,10 +239,16 @@ foreach($contents as $line) {
// again, $parse_to_year is set to January 10 of the upcoming year
$parse_to_year_time = mktime(0,0,0,1,10,($this_year + 1));
$start_date_time = strtotime($start_date);
+ $this_month_start_time = strtotime("$this_year-$this_month-01");
+ $start_range_time = strtotime("-1 month -2 day", $this_month_start_time);
+ $end_range_time = strtotime("+2 month +2 day", $this_month_start_time);
+
+ // NOTE: This part not in use for the time being. We are choosing to fill out 3 months time.
// depending on which view we're looking at, we do one month or one week
// one day is more difficult, I think, so I wrapped that into the week. We'll have to
// add another case for "year" once that's added.
+ /*
if ($current_view == "month") {
$start_range_time = strtotime("$this_year-$this_month-01");
$end_range_time = strtotime("+1 month +1 week", $start_range_time);
@@ -250,6 +256,7 @@ foreach($contents as $line) {
$start_range_time = strtotime(dateOfWeek($getdate, substr($week_start_day, 0, 2)));
$end_range_time = strtotime("+1 week", $start_range_time);
}
+ */
// if $until isn't set yet, we set it to the end of our range we're looking at
if (!$until) $until = $end_range_time;

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