% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/yearJAD.R
\name{yearJAD}
\alias{yearJAD}
\title{Conversion between Japanese Era and AD}
\usage{
yearJAD(yearJ = 1952, yearAD = NULL, EraName = "")
}
\arguments{
\item{yearJ}{a vector of Japanese years
with Japanese era name,  e.g.  M01, T15, S27, H1, R04}

\item{yearAD}{a vector of years in AD \cr
This has priority over yearJ.}

\item{EraName}{a Japanese Era Name to be used for the conversion from AD}
}
\description{
Conversion between Japanese Era and AD
}
\details{
\code{ yearJAD( "R1" ) } returns 2019. \cr
 \code{ yearJAD( yearAD=2019 ) } returns "R01". \cr
 \code{ yearJAD( yearAD=2019, EraName="S" ) } returns "S94".
}
\examples{
# conversion table
yJ <- c("M1","M2","M44","M45","T1","T2","T14","T15","S1","S2","S63","S64"
     , "H01","H02","H30","H31","R1","R2","R4")
yAD <- yearJAD( yJ )
yJfromAD <- yearJAD( yearAD=yAD )
Print(yJ,yAD,yJfromAD)

# using out-of-range Era Name
yearJAD(yearAD=2017, EraName="R")  # negative number
yearJAD(yearAD=2018, EraName="R")  # year 0 means a year before year 1.
yearJAD(yearAD=2019, EraName="R")

yearJAD(yearAD=1952, EraName="T")
yearJAD(yearAD=1952, EraName="S")
yearJAD(yearAD=1952, EraName="H")  # negative number

}
