diff options
Diffstat (limited to 'modules/archive.module')
-rw-r--r-- | modules/archive.module | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/archive.module b/modules/archive.module index 5bdc1b34d..175534d9f 100644 --- a/modules/archive.module +++ b/modules/archive.module @@ -83,10 +83,10 @@ function archive_calendar($original = 0) { $output .= "\n<!-- calendar -->\n"; $output .= "<div class=\"calendar\">"; $output .= "<table>\n"; - $output .= " <tr><td colspan=\"7\" class=\"header-month\">". l("«", "archive/". date("Y/m/d", $prev)) ." ". t(date("F", $requested)) . date(" Y", $requested) ." ". ($nextmonth <= time() ? l("»", "archive/". date("Y/m/d", $next)) : " ") ."</td></tr>\n"; + $output .= " <tr><td colspan=\"7\" class=\"header-month\">". l("«", "archive/". date("Y/m/d", $prev)) ." ". format_date($requested, "custom", "F") . date(" Y", $requested) ." ". ($nextmonth <= time() ? l("»", "archive/". date("Y/m/d", $next)) : " ") ."</td></tr>\n"; // First day of week (0 => Sunday, 1 => Monday, ...) - $weekstart = variable_get("default_firstday", 0); + $cday = $weekstart = variable_get("default_firstday", 0); // Last day of week ($weekstart - 1 == -1) ? $lastday = 6 : $lastday = $weekstart - 1; @@ -95,8 +95,10 @@ function archive_calendar($original = 0) { $firstcolumn = mktime(0, 0, 0, 3, 20 + $weekstart, 1994); $output .= " <tr class=\"header-week\">"; + $days = array(t('Su'), t('Mo'), t('Tu'), t('We'), t('Th'), t('Fr'), t('Sa')); for ($i = 0; $i < 7; $i++) { - $output .= "<td>". t(substr(ucfirst(date("l", $firstcolumn + $i * 86400)), 0, 2)) ."</td>"; + $output .= "<td>". $days[$cday] . "</td>"; + $cday = ($cday < 6 : $cday+1 : 0); } $output .= "</tr>\n"; |