Changeset 360
- Timestamp:
- 03/22/07 12:01:48 (20 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
WWW-CybozuOffice6-Calendar/trunk/lib/WWW/CybozuOffice6/Calendar.pm
r356 r360 10 10 use Text::CSV_XS; 11 11 12 our $VERSION = '0.0 1';12 our $VERSION = '0.02'; 13 13 14 14 sub new { … … 110 110 111 111 # handle recurrent events 112 our %FREQUENCY = ( y => 'YEARLY', m => 'MONTHLY', w => 'WEEKLY', 113 d => 'DAILY', n => 'WEEKDAYS' ); 112 114 sub _parse_recurrent_event { 113 115 my $this = shift; … … 121 123 122 124 # frequency 123 my %FREQUENCY = ( y => 'YEARLY', m => 'MONTHLY', w => 'WEEKLY',124 d => 'DAILY', n => 'WEEKDAYS' );125 125 my $freq = $fields[7]; 126 if ( exists $FREQUENCY{$freq}) {126 if ($freq && exists $FREQUENCY{$freq}) { 127 127 $item->{frequency} = $FREQUENCY{$freq}; 128 128 $item->{frequency_value} = $fields[8] || 0; 129 $item->{until} = $this->to_datetime($fields[4]) 130 if $fields[4] ne '//'; 129 if ($fields[4] =~ m!^(\d+)/(\d+)/(\d+)$!) { 130 my %args = (year => $1, month => $2, day => $3); 131 my $until; 132 if ($item->{is_full_day}) { 133 $until = $this->to_datetime($fields[4], ':'); 134 } else { 135 $until = $item->{end}->clone->set(%args); 136 $until->set_time_zone('UTC'); # timezone must be UTC 137 } 138 $item->{until} = $until; 139 } 131 140 } 132 141
![(please configure the [header_logo] section in trac.ini)](/public/chrome/common/trac_banner.png)