diff options
author | jwangen <jwangen> | 2002-10-02 05:42:23 +0000 |
---|---|---|
committer | jwangen <jwangen> | 2002-10-02 05:42:23 +0000 |
commit | 119332f90bbe84a79d2857c55c347690e3864255 (patch) | |
tree | 1099b7707f7e1ee104ee92c330bc1a0e50bbaeaa /functions/list_months.php | |
parent | 3b66fb070ca24c10b31577b99089bcace6fe9336 (diff) | |
download | phpicalendar-119332f90bbe84a79d2857c55c347690e3864255.tar.gz phpicalendar-119332f90bbe84a79d2857c55c347690e3864255.tar.bz2 phpicalendar-119332f90bbe84a79d2857c55c347690e3864255.zip |
list_months now displays current year only
Diffstat (limited to 'functions/list_months.php')
-rw-r--r-- | functions/list_months.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/functions/list_months.php b/functions/list_months.php index 5d440e7..f3fbb4a 100644 --- a/functions/list_months.php +++ b/functions/list_months.php @@ -1,20 +1,20 @@ <?php - print "<form>\n<select name=\"action\" class=\"query_style\" onChange=\"window.location=(this.options[this.selectedIndex].value);\">\n"; -$i = 0; -$month_time = strtotime($getdate); +$month_time = strtotime("$this_year-01-01"); +$getdate_month = date("m", strtotime($getdate)); + // echo "$this_day, $this_year"; // build the <option> tags -while ($i != 12) { +for ($i=0; $i<12; $i++) { $monthdate = date ("Ymd", $month_time); + $month_month = date("m", $month_time); $select_month = strftime($dateFormat_month, $month_time); - if ($monthdate == $getdate) { + if ($month_month == $getdate_month) { print "<option value=\"month.php?cal=$cal&getdate=$monthdate\" selected>$select_month</option>\n"; } else { print "<option value=\"month.php?cal=$cal&getdate=$monthdate\">$select_month</option>\n"; } $month_time = strtotime ("+1 month", $month_time); - $i++; } // finish <select> |