Calculate public holidays in Japan

Share:

Description

This function is to calculate public holidays in Japan for given year.

Usage

1
2
jholiday(year, holiday.names = TRUE)
is.jholiday(dates)

Arguments

year

A integer value, formatted as YYYY. A year should be in anno Domini, and in and after 1949. Only single value is accepted.

holiday.names

logical. If FALSE, names of holiday are suppressed. The default value is TRUE.

dates

A date value or vector of dates

Details

The function jholiday returns Japanese public holidays of given year according to the Public Holiday Law of 1948. All legal reforms have so far been followed, but users should be careful about holidays in the future because of possible change in law. The function is.jholiday answers to whether or not given date is holiday.

Value

The function jholiday returns an object of Date class with or without holiday names. The function is.jholiday returns a logical vector.

Note

There are several other R functions to calculate holidays, including public holiday in Japan; however, none of functions works correctly due to very complicated holiday system in Japan, especially the Happy Monday System and the citizens' holiday rule. Only jholiday may work correctly. In case you get wrong results by the function jholiday, please report to the author.

Author(s)

Susumu Tanimura aruminat@gmail.com

References

Public Holiday Law http://www8.cao.go.jp/chosei/shukujitsu/gaiyou.html

Ephemeris Computation Workshop (1991) Sinkoyomi-benricho, Koseisha Koseikaku: Tokyo, 1991, ISBN:9784769907008.

See Also

holiday in timeDate package, holidays in TimeWarp package, Holidays in Holidays package.

Examples

1
2
3
    jholiday(2013)
    d <- as.Date(c("2000-09-22","2013-11-04", "1968-01-27"))
    is.jholiday(d)