Changeset 520

Show
Ignore:
Timestamp:
09/05/08 00:09:03 (4 months ago)
Author:
ogawa
Message:

Correctly handles full-day events for Cybozu Office 7.
Update version number.

Location:
cybozu2ical/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • cybozu2ical/trunk/cybozu2ical

    r519 r520  
    1818use Getopt::Long; 
    1919 
    20 our $VERSION = '0.31'; 
     20our $VERSION = '0.32'; 
    2121 
    2222### 
     
    140140        dtstamp     => to_icaldate( $item->modified ), 
    141141    ); 
    142  
    143     $args{comment} = decode_utf8( $item->comment ) 
    144       if $opt{debug} && $item->comment; 
    145142 
    146143    if ( $item->is_full_day ) { 
     
    196193      if $opt{url}; 
    197194 
     195    $args{comment} = decode_utf8( $item->comment ) 
     196      if $opt{debug} && $item->comment; 
     197 
    198198    $vevent->add_properties(%args); 
    199199    $vcalendar->add_entry($vevent); 
  • cybozu2ical/trunk/lib/WWW/CybozuOffice6/Calendar.pm

    r515 r520  
    1212use WWW::CybozuOffice6::Calendar::RecurrentEvent; 
    1313 
    14 our $VERSION = '0.31'; 
     14our $VERSION = '0.32'; 
    1515 
    1616sub new { 
  • cybozu2ical/trunk/lib/WWW/CybozuOffice6/Calendar/Event.pm

    r518 r520  
    3434    # (set_time == empty) => A full-day event 
    3535    # (set_time != empty) && (end_time == empty) => A malformed event 
    36     if ( $param{set_time} eq ':' ) { 
     36    if ( $param{set_time} eq '' || $param{set_time} eq ':' ) { 
    3737        $start = $start->truncate( to => 'day' ); 
    3838        $end = $end->add( days => 1 )->truncate( to => 'day' ); 
    3939        $this->is_full_day(1); 
    4040    } 
    41     elsif ( $param{end_time} eq ':' ) { 
     41    elsif ( $param{end_time} eq '' || $param{end_time} eq ':' ) { 
    4242        $end = $start->clone->add( minutes => 10 ); 
    4343    } 
     
    6363    return 
    6464      unless $ymd 
    65           && (   $ymd =~ m!^(\d+)/(\d+)/(\d+)$! 
    66               || $ymd =~ m!^da\.(\d+)\.(\d+)\.(\d+)$! ); 
     65          && ( $ymd =~ m!^da\.(\d+)\.(\d+)\.(\d+)$! 
     66              ||    $ymd =~ m!^(\d+)/(\d+)/(\d+)$! ); 
    6767    @args{qw(year month day)} = ( $1, $2, $3 ); 
    6868