jholiday: Calculate public holidays in Japan

Description Usage Arguments Details Value Note Author(s) References See Also Examples

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)

Example output

Loading required package: stringr
           New Year's Day         Coming of Age Day            Foundation Day 
             "2013-01-01"              "2013-01-14"              "2013-02-11" 
       Vernal Equinox Day                 Showa Day Constitution Memorial Day 
             "2013-03-20"              "2013-04-29"              "2013-05-03" 
             Greenery Day            Children's Day          Transfer Holiday 
             "2013-05-04"              "2013-05-05"              "2013-05-06" 
               Marine Day  Respect-for-the-Aged Day      Autumnal Equinox Day 
             "2013-07-15"              "2013-09-16"              "2013-09-23" 
    Health and Sports Day               Culture Day          Transfer Holiday 
             "2013-10-14"              "2013-11-03"              "2013-11-04" 
  Labour Thanksgiving Day    The Emperor's Birthday 
             "2013-11-23"              "2013-12-23" 
[1] FALSE  TRUE FALSE

Nippon documentation built on May 2, 2019, 1:03 p.m.