Class::DBI::Plugin::Calendar - Simple Calendar Support for Class::DBI
package DB; use base 'Class::DBI'; use Class::DBI::Plugin::Calendar qw(date_fieldname); # the same as Calendar::Simple::calendar my @curr = DB->calendar; # get current month my @this_sept = DB->calendar(9); # get 9th month of current year my @sept_2002 = DB->calendar(9, 2002); # get 9th month of 2002 my @monday = DB->calendar(9, 2002, 1); # week starts with Monday
Please note that this module only works with mysql at this point, as far as I know. Retrieve the objects in useful calendar-like data structures, similar to Calendar::Simple.
@weeks holds arefs of 7 days each (there are dummy placeholders where needed), which are represented by Class::DBI::Plugin::Calendar::Day objects. Please refer to the Class::DBI::Plugin::Calendar::Day perldoc for instructions.
Class::DBI, Calendar::Simple, Class::DBI::Plugin::Calendar::Day
James Tolley, <james@bitperfect.com>
Copyright (C) 2005 by James Tolley
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Class::DBI::Plugin::Calendar, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::DBI::Plugin::Calendar
CPAN shell
perl -MCPAN -e shell install Class::DBI::Plugin::Calendar
For more information on module installation, please visit the detailed CPAN module installation guide.