Changeset 448 for cybozu2ical/trunk/lib/WWW
- Timestamp:
- 10/16/07 22:14:17 (15 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
cybozu2ical/trunk/lib/WWW/CybozuOffice6/Calendar.pm
r447 r448 11 11 use Text::CSV_XS; 12 12 13 our $VERSION = '0. 03';13 our $VERSION = '0.20'; 14 14 15 15 sub new { … … 223 223 @WWW::CybozuOffice6::Calendar::RecurrentEvent::ISA = qw( WWW::CybozuOffice6::Calendar::Event ); 224 224 225 sub rrule { shift->_accessor('rrule', @_) } 226 # for compatibility 225 227 sub frequency { shift->_accessor('frequency', @_) } 226 228 sub frequency_value { shift->_accessor('frequency_value', @_) } … … 244 246 return unless $freq && exists $FREQUENCY{$freq}; 245 247 246 $this->{frequency} = $FREQUENCY{$freq}; 247 $this->{frequency_value} = $param{freq_value} || 0; 248 # rrule 249 my %rrule = (); 250 if ($FREQUENCY{$freq} eq 'WEEKDAYS') { 251 %rrule = ( FREQ => 'WEEKLY', BYDAY => 'MO,TU,WE,TH,FR' ); 252 } else { 253 %rrule = ( FREQ => $FREQUENCY{$freq} ); 254 } 255 if ($param{freq_value} =~ /^\d(SU|MO|TU|WE|TH|FR|SA)$/) { 256 $rrule{BYDAY} = $param{freq_value}; 257 $rrule{INTERVAL} = 1; 258 } 248 259 249 260 # until … … 257 268 $until->set_time_zone('UTC'); # timezone must be UTC 258 269 } 259 $this->{until} = $until; 260 } 270 $rrule{UNTIL} = $until; 271 } 272 273 $this->{rrule} = \%rrule; 261 274 262 275 # exdates … … 269 282 } 270 283 284 # for compatibility 285 $this->{frequency} = $FREQUENCY{$freq}; 286 $this->{frequency_value} = $param{freq_value} || 0; 287 $this->{until} = $rrule{UNTIL} if exists $rrule{UNTIL}; 288 271 289 1; 272 290 } … … 418 436 Modified date of the item, or current timestamp. DateTime object. 419 437 420 =item frequency (string) 438 =item rrule (HASHREF of rrule properties) 439 440 Assocative list of recurrence rules for the item, which is *roughly* 441 based on iCalendar Specification (RFC 2445). 442 443 =item exdates (ARRAYREF of DateTime objects) 444 445 Excluded dates of the reccurent item. If the item has no excluded 446 dates, this should be "undefined". 447 448 =item [obsolete] frequency (string) 421 449 422 450 Frequency mode of the recurrent item. Each recurrent items has one … … 425 453 "YEARLY", "MONTHLY", "WEEKLY", "DAILY", "WEEKDAYS" 426 454 427 =item frequency_value (integer)455 =item [obsolete] frequency_value (integer) 428 456 429 457 Frequency value of the recurrent item. 430 458 431 =item until (DateTime object)459 =item [obsolete] until (DateTime object) 432 460 433 461 End date of the recurrence for the recurrent item. If the recurrence 434 462 continues infinitely, thie value should be "undefined". 435 463 436 =item exdates (Array of DateTime objects)437 438 Excluded dates of the reccurent item. If the item has no excluded439 dates, this should be "undefined".440 441 464 =back 442 465
![(please configure the [header_logo] section in trac.ini)](/public/chrome/common/trac_banner.png)