NAME
Calendar::Japanese::Holiday - Japanese holidays in calender
SYNOPSIS
use Calendar::Japanese::Holiday;
# Getting a list of holidays
$holidays = getHolidays(2008, 5);
$holidays = getHolidays(2008, 5, 1);
# Examining whether it is holiday or not.
$name = isHoliday(2007, 5, 5);
DESCRIPTION
This module treats holidays information in Japanese calendar. The list of holidays can be acquired, and you can examine whether a day is holiday or not. You can acquire the holiday name too.
FUNCTIONS
- getHolidays($year, $month [, $furikae])
-
Returns a hash reference that has holidays in $year/$month. Returns empty hash reference if no holidays. It returns substitute holidays too if $furikae is true. $furikae is false when $furikae is omitted. $year is supported after 1948. A undef is returned if error ocucred.
# Case 1 - $furikae is omitted $holidays = getHolidays(2008, 5); Return: $holidays = { '4' => "\x{307f}\x{3069}\x{308a}\x{306e}\x{65e5}", # Midori-no-hi '3' => "\x{61b2}\x{6cd5}\x{8a18}\x{5ff5}\x{65e5}", # Kenpou-Kinenbi '5' => "\x{3053}\x{3069}\x{3082}\x{306e}\x{65e5}" # Kodomo-no-hi }; # Case 2 - $furikae is true $holidays = getHolidays(2008, 5, 1); Return: $holidays = { '6' => "\x{632f}\x{66ff}", # Furikae '4' => "\x{307f}\x{3069}\x{308a}\x{306e}\x{65e5}", # Midori-no-hi '3' => "\x{61b2}\x{6cd5}\x{8a18}\x{5ff5}\x{65e5}", # Kenpou-Kinenbi '5' => "\x{3053}\x{3069}\x{3082}\x{306e}\x{65e5}" # Kodomo-no-hi }; # Case 3 - no holidays $holidays = getHolidays(2008, 6); Return: $holidays = {};
- isHoliday($year, $month, $day [, $furikae])
-
Returns holiday name. Returns undef if $year/$month/$day is not holiday. $furikae is same as getHolidays().
$name = isHoliday(2007, 5, 5); $name is "\x{3053}\x{3069}\x{3082}\x{306e}\x{65e5}" Kodomo-no-hi
SEE ALSO
http://wiki.bit-hive.com/tomizoo/pg/Perl%20%BD%CB%C6%FC%CC%BE%A4%CE%BC%E8%C6%C0
(In Japanese document)
AUTHOR
Kazuyoshi Tomita, <kztomita@bit-hive.com>
COPYRIGHT AND LICENSE
Copyright (C) 2007 by Kazuyoshi Tomita
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.1 or, at your option, any later version of Perl 5 you may have available.