32d31
< #use POSIX;                  # req'd for ceil() and floor()
40c39
<         $thisYear $thisMonth $thisQtr 
---
>         $thisDay $thisYear $thisMonth $thisQtr 
42c41
<         $wikiUserName
---
>         $wikiUserName $userHref
72a72
>     $thisDay = $now[3];
112,144c112,116
<     if ($_[0] eq 'week') {
<         # make a "week" style anchor
<         return '<a ' .
<                 # open in new window:
<                 'TARGET="_blank" '.
<                 # link:
<                 'href="#' .
<                 "YearWeek" .
<                 $_[1] .
<                 sprintf("%02d", $_[2]) .
<                 '"> ' .
<                 # anchor:
<                 $_[1] .
<                 '.' .
<                 sprintf("%02d", $_[2]) .
<                 '</a>';
<     }
<     else {
<         # make a "day" style anchor
<         return '<a ' .
<                 # open in new window:
<                 'TARGET="_blank" '.
<                 # link:
<                 'href="#' .
<                 'YearMonthDay' .
<                 $_[1] .
<                 sprintf("%02d", $_[2]) .
<                 sprintf("%02d", $_[3]) .
<                 '">' .
<                 # anchor:
<                 $_[3] .
<                 '</a>';
<     }
---
>     my $anchor = qq~<a TARGET="_blank" href="$userHref$_[1]~ . sprintf("%02d", $_[2]);
>     $anchor .= ($_[0] eq 'week') && ( qq~">$_[1].~ . sprintf("%02d", $_[2]) ) 
> 	|| ( sprintf("%02d", $_[3]) . qq~">$_[3]~ );
>     $anchor .= '</a>';
>     return $anchor;
201a174
>   if ($y % 400 != 0) { return 28; }    # shouldn't this test come before the century test?
203d175
<   if ($y % 400 != 0) { return 28; }
289a262,269
>     $out .= <<__STYLE__;
> <style>
>     .week   { background:#ccc; }
>     .day    { background:#eee; }
>     .today  { background:yellow; }
> </style>
> __STYLE__
> 
294a275,276
>     $userHref = scalar &TWiki::extractNameValuePair( $arg1, "href" ) || ( '../Main/' . $wikiUserName );
> 
347c329
<     $out .= "<table border=2>\n" .
---
>     $out .= qq{<table style="width:auto; border:0px;">\n} .
363,367c345
<             $out .= '<tr><td>' . 
<                     generateAnchor('week', 
<                         $displayYear,
<                         $weekInYear);
<                     "</td>\n";
---
>             $out .= '<tr><td class="week">' . generateAnchor('week', $displayYear, $weekInYear) . "</td>\n";
370,376c348,349
<                     $out .= '<td>' . 
<                             generateAnchor('day', 
<                                 $displayYear,
<                                 $displayMonth,
<                                 $date
<                                 ) . 
<                             "</td>\n";
---
> 		    my $day_class = ( $thisYear==$displayYear && $thisMonth==$displayMonth && $thisDay==$date && 'today' ) || 'day';
>                     $out .= qq{<td class="$day_class">} . generateAnchor('day', $displayYear, $displayMonth, $date ) . "</td>\n";
