Calendar-Slots
view release on metacpan or search on metacpan
lib/Calendar/Slots.pm view on Meta::CPAN
Calendar::Slots - Manage time slots
=head1 VERSION
version 0.15
=head1 SYNOPSIS
use Calendar::Slots;
my $cal = new Calendar::Slots;
$cal->slot( date=>'2009-10-11', start=>'10:30', end=>'11:30', name=>'busy' );
my $slot = $cal->find( date=>'2009-10-11', time=>'11:00' );
print $slot->name; # 'busy'
=head1 DESCRIPTION
This is a simple module to manage a calendar of very generic time slots. Time slots are anything
with a start and end time on a given date or weekday. Time slots cannot overlap. If a new
time slot overlaps another pre-existing time slot, the calendar will acommodate the slot automatically.
It handles two types of slots: fixed dates, or recurring on weekdays.
When looking for an event, it will search from most specific (date) to more
generic (recurring). That is, if a slot exist for both a date and a weekday,
lib/Calendar/Slots/Slot.pm view on Meta::CPAN
=head1 VERSION
version 0.15
=head1 SYNOPSIS
use Calendar::Slots::Slot;
my $slot = new Calendar::Slots::Slot( date=>'2009-10-22', start=>'20:30', end=>'22:30', name=>'birthday' );
print
$slot->contains( date=>'2009-10-22', time=>'21:00' )
? 'I'm busy'
: 'I'm free then';
=head1 DESCRIPTION
This is the basic class defining a calendar slot.
=head1 ATTRIBUTES
has name => ( is => 'rw', isa => 'Str' );
( run in 0.798 second using v1.01-cache-2.11-cpan-87723dcf8b7 )