Changeset 375

Show
Ignore:
Timestamp:
06/16/07 01:30:37 (1 year ago)
Author:
ogawa
Message:

make code cleaning, and add the description of "exdates" method.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cybozu2ical/trunk/cybozu2ical

    r374 r375  
    7171 
    7272    if ($item->is_full_day) { 
    73         $args{dtstart} = [to_icaldate($item->start, 1), { VALUE => 'DATE' }]; 
    74         $args{dtend}   = [to_icaldate($item->end,   1), { VALUE => 'DATE' }]; 
     73        $args{dtstart} = [ to_icaldate($item->start, 1), { VALUE => 'DATE' } ]; 
     74        $args{dtend}   = [ to_icaldate($item->end,   1), { VALUE => 'DATE' } ]; 
    7575    } else { 
    76         $args{dtstart} = [to_icaldate($item->start, 0), { TZID => $time_zone }]; 
    77         $args{dtend}   = [to_icaldate($item->end,   0), { TZID => $time_zone }]; 
     76        $args{dtstart} = [ to_icaldate($item->start, 0), { TZID => $time_zone } ]; 
     77        $args{dtend}   = [ to_icaldate($item->end,   0), { TZID => $time_zone } ]; 
    7878    } 
    7979 
     
    9090 
    9191        # exdate 
    92 #       $args{exdate} = join ',', map { to_icaldate($_, 1) } $item->exdates 
    93 #           if $item->exdates; 
    9492        if ($item->exdates) { 
     93            my $exdate; 
    9594            if ($item->is_full_day) { 
    96                 $args{exdate} = [join(',', map { to_icaldate($_, 1) } $item->exdates), { VALUE => 'DATE' }]; 
     95                $exdate = join ',', map { to_icaldate($_, 1) } $item->exdates; 
     96                $args{exdate} = [ $exdate, { VALUE => 'DATE' } ]; 
    9797            } else { 
    98                 $args{exdate} = [join(',', map { to_icaldate($_, 0) } $item->exdates), { TZID => $time_zone }]; 
     98                $exdate = join ',', map { to_icaldate($_, 0) } $item->exdates; 
     99                $args{exdate} = [ $exdate, { TZID => $time_zone } ]; 
    99100            } 
    100101        } 
  • cybozu2ical/trunk/lib/WWW/CybozuOffice6/Calendar.pm

    r374 r375  
    202202    my $this = shift; 
    203203    return unless $this->{exdates}; 
    204     my $dates = $this->{exdates}; 
    205     wantarray ? @$dates : @$dates[0]; 
     204    my $exdates = $this->{exdates}; 
     205    wantarray ? @$exdates : @$exdates[0]; 
    206206} 
    207207 
     
    234234    # exdates 
    235235    if (defined $param{exdates}) { 
    236         my @dates; 
     236        my @exdates; 
    237237        for (@{$param{exdates}}) { 
    238             push @dates, $this->to_datetime($_, $param{start_time}); 
     238            push @exdates, $this->to_datetime($_, $param{start_time}); 
    239239        } 
    240         $this->{exdates} = \@dates; 
     240        $this->{exdates} = \@exdates; 
    241241    } 
    242242 
     
    395395continues infinitely, thie value should be "undefined". 
    396396 
     397=item exdates (Array of DateTime objects) 
     398 
     399Excluded dates of the reccurent item.  If the item has no excluded 
     400dates, this should be "undefined". 
     401 
    397402=back 
    398403