- Timestamp:
- 09/01/08 19:33:58 (4 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
cybozu2ical/trunk/lib/WWW/CybozuOffice6/CalendarDriver/SyncCalendar.pm
r515 r518 50 50 my $num_fields = @fields - 1; 51 51 next if $num_fields < 13; 52 $fields[1] =~ s/^ts\.//; # remove rubbish53 52 54 53 # Cybozu Calendar CSV Format 55 54 # GENERIC | RECCURENT 56 # [ 0] id? | id?57 # [ 1] created | created55 # [ 0] ID 56 # [ 1] TimeStamp 58 57 # [ 2] <BLANK> x start_date / end_date 59 # [ 3] start_datex initial start_date?60 # [ 4] end_datex until_date61 # [ 5] start_time | start_time62 # [ 6] end_time | end_time63 # [ 7] <BLANK> | freq64 # [ 8] <BLANK> | freq_value65 # [ 9] ??? | ???66 # [10] ??? | ???67 # [11] abbrev | abbrev68 # [12] summary | summary69 # [13] description | description58 # [ 3] SetDate x initial start_date? 59 # [ 4] EndDate x until_date 60 # [ 5] SetTime 61 # [ 6] Endtime 62 # [ 7] <BLANK> | TypeOmit 63 # [ 8] <BLANK> | Day 64 # [ 9] Private 65 # [10] Banner 66 # [11] Event 67 # [12] Detail 68 # [13] Memo 70 69 71 70 my %param; 72 @param{ 73 qw(id created start_time end_time freq freq_value abbrev summary description) 71 @param{ qw(id timestamp set_time end_time type day event detail memo) 74 72 } = @fields[ 0, 1, 5 .. 8, 11 .. 13 ]; 73 75 74 $param{time_zone} = $cal->{time_zone} || 'Asia/Tokyo'; 76 75 76 if ( $num_fields > 14 ) { 77 my @exception = @fields[ 14 .. $num_fields ]; 78 $param{exception} = \@exception; 79 } 80 77 81 my $item; 78 if ( !$param{ freq} ) {79 @param{qw(s tart_date end_date)} = @fields[ 3, 4 ];82 if ( !$param{type} ) { 83 @param{qw(set_date end_date)} = @fields[ 3, 4 ]; 80 84 $item = WWW::CybozuOffice6::Calendar::Event->new(%param); 81 85 } 82 86 else { 83 @param{qw(start_date end_date until_date)} = @fields[ 2, 2, 4 ]; 84 if ( $num_fields > 13 ) { 85 my @exdates = @fields[ 14 .. $num_fields ]; 86 $param{exdates} = \@exdates; 87 } 88 my $freq = $param{freq}; 89 if ( $freq =~ /^[1-5]$/ ) { 90 $param{freq} = 'm'; 91 my @week_str = ( 'SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA' ); 92 $param{freq_value} = $freq . $week_str[ $param{freq_value} ]; 93 } 87 @param{qw(set_date end_date until_date)} = @fields[ 2, 2, 4 ]; 94 88 $item = WWW::CybozuOffice6::Calendar::RecurrentEvent->new(%param); 95 89 }
![(please configure the [header_logo] section in trac.ini)](/public/chrome/common/trac_banner.png)