aboutsummaryrefslogtreecommitdiffstats
path: root/functions/template.php
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2006-03-21 09:52:29 +0000
committerJim Hu <jimhu@users.sourceforge.net>2006-03-21 09:52:29 +0000
commita430b6f5528f4698cefb45edde90bf869f05eeda (patch)
tree5b21f68143a9f32ad05c98c64685b49994febe2e /functions/template.php
parent3280427d50b95564c2a21396b5d3bb603795d014 (diff)
downloadphpicalendar-a430b6f5528f4698cefb45edde90bf869f05eeda.tar.gz
phpicalendar-a430b6f5528f4698cefb45edde90bf869f05eeda.tar.bz2
phpicalendar-a430b6f5528f4698cefb45edde90bf869f05eeda.zip
add year printview, fix misc bugs
Diffstat (limited to 'functions/template.php')
-rw-r--r--functions/template.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/functions/template.php b/functions/template.php
index af93258..32e0b2d 100644
--- a/functions/template.php
+++ b/functions/template.php
@@ -61,10 +61,11 @@ class Page {
$loop_event = trim($match1[1]);
$loop_day = trim($match3[1]);
$parse_month = date ("Ym", strtotime($getdate));
+ $parse_year = date ("Y", strtotime($getdate));
foreach($master_array as $key => $val) {
preg_match ('/([0-9]{6})([0-9]{2})/', $key, $regs);
- if ((($regs[1] == $parse_month) && ($printview == 'month')) || (($key == $getdate) && ($printview == 'day')) || ((($key >= $week_start) && ($key <= $week_end)) && ($printview == 'week'))) {
+ if ((($regs[1] == $parse_month) && ($printview == 'month')) || (($key == $getdate) && ($printview == 'day')) || ((($key >= $week_start) && ($key <= $week_end)) && ($printview == 'week')) || ((substr($regs[1],0,4) == $parse_year) && ($printview == 'year'))) {
$events_week++;
$dayofmonth = strtotime ($key);
$dayofmonth = localizeDate ($dateFormat_day, $dayofmonth);

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