]> git.donarmstrong.com Git - deb_pkgs/libhtml-calendarmonth-perl.git/blobdiff - lib/HTML/CalendarMonth.pm
upgrade to 1.26; fix lintian issues
[deb_pkgs/libhtml-calendarmonth-perl.git] / lib / HTML / CalendarMonth.pm
index 425f9c7518706c5bc72788453570e1124411b1b0..6014d60488d141c60aaa807697f013878006cf27 100644 (file)
@@ -1,14 +1,12 @@
 package HTML::CalendarMonth;
 package HTML::CalendarMonth;
-BEGIN {
-  $HTML::CalendarMonth::VERSION = '1.25';
+{
+  $HTML::CalendarMonth::VERSION = '1.26';
 }
 
 use strict;
 use warnings;
 use Carp;
 
 }
 
 use strict;
 use warnings;
 use Carp;
 
-BEGIN { $HTML::CalendarMonth::VERSION = 1.25 }
-
 use HTML::ElementTable 1.18;
 use HTML::CalendarMonth::Locale;
 use HTML::CalendarMonth::DateTool;
 use HTML::ElementTable 1.18;
 use HTML::CalendarMonth::Locale;
 use HTML::CalendarMonth::DateTool;
@@ -241,17 +239,15 @@ sub _gencal {
   $self->item($self->year)->replace_content($self->item_alias($self->year));
 
   if ($self->_head_my) {
   $self->item($self->year)->replace_content($self->item_alias($self->year));
 
   if ($self->_head_my) {
-    if ($self->head_m) {
-      $self->item($self->month)->attr('colspan',$width - $self->year_span);
+    if ($self->head_m && $self->head_y) {
+      $self->item($self->year) ->attr('colspan', $self->year_span);
+      $self->item($self->month)->attr('colspan', $width - $self->year_span);
     }
     }
-    else {
+    elsif ($self->head_y) {
       $self->item($self->month)->mask(1);
       $self->item($self->year)->attr('colspan', $width);
     }
       $self->item($self->month)->mask(1);
       $self->item($self->year)->attr('colspan', $width);
     }
-    if ($self->head_y) {
-      $self->item($self->year)->attr('colspan',$self->year_span);
-    }
-    else {
+    elsif ($self->head_m) {
       $self->item($self->year)->mask(1);
       $self->item($self->month)->attr('colspan', $width);
     }
       $self->item($self->year)->mask(1);
       $self->item($self->month)->attr('colspan', $width);
     }
@@ -307,11 +303,14 @@ sub _gencal {
 
   # css classes
   if ($self->enable_css) {
 
   # css classes
   if ($self->enable_css) {
-    $self                             ->push_attr(class => 'hcm-table'     );
-    $self->item_row($self->dayheaders)->push_attr(class => 'hcm-day-head'  );
-    $self->item    ($self->year)      ->push_attr(class => 'hcm-year-head' );
-    $self->item    ($self->month)     ->push_attr(class => 'hcm-month-head');
-    $self->item    ($self->week_nums) ->push_attr(class => 'hcm-week-head' )
+    $self->push_attr(class => 'hcm-table');
+    $self->item_row($self->dayheaders)->push_attr(class => 'hcm-day-head')
+      if $self->head_dow;
+    $self->item($self->year)->push_attr(class => 'hcm-year-head')
+      if $self->head_y;
+    $self->item($self->month)->push_attr(class => 'hcm-month-head')
+      if $self->head_m;
+    $self->item($self->week_nums) ->push_attr(class => 'hcm-week-head')
       if $self->head_week;
   }
 
       if $self->head_week;
   }
 
@@ -1080,6 +1079,10 @@ Specifies whether to display the year header. Default 1.
 
 Specifies whether to display days of the week header. Default 1.
 
 
 Specifies whether to display days of the week header. Default 1.
 
+=item head_week
+
+Specifies whether to display the week-of-year numbering. Default 0.
+
 =item locale
 
 Specifies the id of the locale in which to render the calendar. Default
 =item locale
 
 Specifies the id of the locale in which to render the calendar. Default
@@ -1108,10 +1111,6 @@ custom label you prefer. Lookups, such as C<day('Sun')>, will still use
 the locale string, but when the calendar is rendered the aliased value
 will appear.
 
 the locale string, but when the calendar is rendered the aliased value
 will appear.
 
-=item head_week
-
-Specifies whether to display the week-of-year numbering. Default 0.
-
 =item week_begin
 
 Specify first day of the week, which can be 1..7, starting with Sunday.
 =item week_begin
 
 Specify first day of the week, which can be 1..7, starting with Sunday.