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->new(branchcode => $branchcode);
Each library branch has its own Calendar. $branchcode specifies which Calendar you want.
$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 happened 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.
ModWeekdayholiday(weekday =>$weekday,
title => $title,
description => $description)
Modifies the title and description of a weekday for $self->{branchcode}.
$weekday Is the title to update for the holiday.
$description Is the description to update for the holiday.
ModDaymonthholiday(day => $day,
month => $month,
title => $title,
description => $description);
Modifies the title and description for a day/month holiday for $self->{branchcode}.
$day The day of the month for the update.
$month The month to be used for the update.
$title The title to be updated for the holiday.
$description The description to be update for the holiday.
ModSingleholiday(day => $day,
month => $month,
year => $year,
title => $title,
description => $description);
Modifies the title and description for a single holiday for $self->{branchcode}.
$day Is the day of the month to make the update.
$month Is the month to make the update.
$year Is the year to make the update.
$title Is the title to update for the holiday formed by $year/$month/$day.
$description Is the description to update for the holiday formed by $year/$month/$day.
ModExceptionholiday(day => $day,
month => $month,
year => $year,
title => $title,
description => $description);
Modifies the title and description for an exception holiday for $self->{branchcode}.
$day Is the day of the month for the holiday.
$month Is the month for the holiday.
$year Is the year for the holiday.
$title Is the title to be modified for the holiday formed by $year/$month/$day.
$description Is the description to be modified 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.
delete_holiday_range(day => $day,
month => $month,
year => $year);
Delete a holiday range of dates for $self->{branchcode}.
$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.
delete_holiday_range_repeatable(day => $day,
month => $month);
Delete a holiday for $self->{branchcode}.
$day Is the day month to make the date to delete.
$month Is month to make the date to delete.
delete_exception_holiday_range(weekday => $weekday
day => $day,
month => $month,
year => $year);
Delete a holiday for $self->{branchcode}.
$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 whether if is a holiday or not.
$month Is the month to check whether if is a holiday or not.
$year Is the year to check whether if is a holiday or not.
$calendar->copy_to_branch($target_branch)
Koha Physics Library UNLP <matias_veleda@hotmail.com>