C4::Calendar::Calendar - Koha module dealing with holidays.
use C4::Calendar::Calendar;
This package is used to deal with holidays. Through this package, you can set all kind of holidays for the library.
$calendar = C4::Calendar::Calendar->new(branchcode => $branchcode);
$branchcode
Is the branch code wich you want to use calendar.
$calendar->change_branchcode(branchcode => $branchcode)
Change the calendar branch code. This means to change the holidays structure.
$branchcode
Is the branch code wich you want to use calendar.
$week_days_holidays = $calendar->get_week_days_holidays();
Returns a hash reference to week days holidays.
$day_month_holidays = $calendar->get_day_month_holidays();
Returns a hash reference to day month holidays.
$exception_holidays = $calendar->exception_holidays();
Returns a hash reference to exception holidays. This kind of days are those which stands for a holiday, but you wanted to make an exception for this particular date.
$single_holidays = $calendar->get_single_holidays();
Returns a hash reference to single holidays. This kind of holidays are those which happend just one time.
insert_week_day_holiday(weekday => $weekday, title => $title, description => $description);
Inserts a new week day for $self->{branchcode}.
$day
Is the week day to make holiday.
$title
Is the title to store for the holiday formed by $year/$month/$day.
$description
Is the description to store for the holiday formed by $year/$month/$day.
insert_day_month_holiday(day => $day, month => $month, title => $title, description => $description);
Inserts a new day month holiday for $self->{branchcode}.
$day
Is the day month to make the date to insert.
$month
Is month to make the date to insert.
$title
Is the title to store for the holiday formed by $year/$month/$day.
$description
Is the description to store for the holiday formed by $year/$month/$day.
insert_single_holiday(day => $day, month => $month, year => $year, title => $title, description => $description);
Inserts a new single holiday for $self->{branchcode}.
$day
Is the day month to make the date to insert.
$month
Is month to make the date to insert.
$year
Is year to make the date to insert.
$title
Is the title to store for the holiday formed by $year/$month/$day.
$description
Is the description to store for the holiday formed by $year/$month/$day.
insert_exception_holiday(day => $day, month => $month, year => $year, title => $title, description => $description);
Inserts a new exception holiday for $self->{branchcode}.
$day
Is the day month to make the date to insert.
$month
Is month to make the date to insert.
$year
Is year to make the date to insert.
$title
Is the title to store for the holiday formed by $year/$month/$day.
$description
Is the description to store for the holiday formed by $year/$month/$day.
delete_holiday(weekday => $weekday day => $day, month => $month, year => $year);
Delete a holiday for $self->{branchcode}.
$weekday
Is the week day to delete.
$day
Is the day month to make the date to delete.
$month
Is month to make the date to delete.
$year
Is year to make the date to delete.
$isHoliday = isHoliday($day, $month $year);
$day
Is the day to check wether if is a holiday or not.
$month
Is the month to check wether if is a holiday or not.
$year
Is the year to check wether if is a holiday or not.
my ($day, $month, $year) = $calendar->addDate($day, $month, $year, $offset)
$day
Is the starting day of the interval.
$month
Is the starting month of the interval.
$year
Is the starting year of the interval.
$offset
Is the number of days that this function has to count from $date.
my $daysBetween = $calendar->daysBetween($dayFrom, $monthFrom, $yearFrom, $dayTo, $monthTo, $yearTo)
$dayFrom
Is the starting day of the interval.
$monthFrom
Is the starting month of the interval.
$yearFrom
Is the starting year of the interval.
$dayTo
Is the ending day of the interval.
$monthTo
Is the ending month of the interval.
$yearTo
Is the ending year of the interval.
Koha Physics Library UNLP <matias_veleda@hotmail.com>