in reply to Parsing ICal Format
To use it all to work with your iCal dates, here's a Synopsis:
Check the DateTime documentation for the piles of other things the DateTime module can do for you. It overrides operators like + and -. If you print the object in scalar format, it will return a string: print "$DateTimeObject2";use DateTime; use DateTime::Format::ICal; # Convert 'parts' into an iCal: my $DateTimeObject1 = DateTime->new( year=>2003, month=>2, day=>19, hour=>16, minute=>23, second=>22 ); print DateTime::Format::ICal->format_datetime( $DateTimeObject1); #20030219T162322Z # Convert an iCal into parts: my $DateTimeObject2 = DateTime::Format::ICal->parse_datetime('20030219 +T162322Z'); print $DateTimeObject2->year; #2003 print $DateTimeObject2->month; #2 #etc...
|
|---|