NAME
Net::ICal::Duration -- represent a length of time
SYNOPSIS
use Net::ICal;
$d = Net::ICal::Duration->new("P3DT6H15M10S");
$d = Net::ICal::Duration->new(3600); # 1 hour in seconds
DESCRIPTION
Duration Represents a length of time, such a 3 days, 30 seconds or 7 weeks. You would use this for representing an abstract block of time; "I want to have a 1-hour meeting sometime." If you want a calendar- and timezone-specific block of time, see Net::ICal::Period.
METHODS
new
Create a new Duration from:
A string in RFC2445 duration format
An integer representing a number of seconds
clone()
Return a new copy of the duration.
is_valid()
Determine if this is a valid duration (given criteria TBD). This function isn't implemented yet.
as_int()
Return the length of the duration as seconds.
as_ical()
Return the duration as a fragment of an iCal property-value string (":PT2H"). This is an evil hack workaround; it shouldn't really work this way. This whole class needs to be reimplemented as a child of Net::ICal::Property.
as_ical_value()
Return the duration in an RFC2445 format value string ("PT2H" for example).
add($duration)
Return a new duration that is the sum of this and $duration. Does not modify this object.
subtract($duration)
Return a new duration that is the difference between this and $duration. Does not modify this object.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 113:
You forgot a '=back' before '=head2'