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.
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
jholiday(2013)
d <- as.Date(c("2000-09-22","2013-11-04", "1968-01-27"))
is.jholiday(d)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Nippon)
Loading required package: maptools
Loading required package: sp
Checking rgeos availability: TRUE
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Nippon/jholiday.Rd_%03d_medium.png", width=480, height=480)
> ### Name: jholiday
> ### Title: Calculate public holidays in Japan
> ### Aliases: jholiday is.jholiday
> ### Keywords: holiday Japan
>
> ### ** Examples
>
> jholiday(2013)
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"
> d <- as.Date(c("2000-09-22","2013-11-04", "1968-01-27"))
> is.jholiday(d)
[1] FALSE TRUE FALSE
>
>
>
>
>
> dev.off()
null device
1
>