50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

Nippon (version 0.7.1)

wareki2AD: Conversion from Japanese imperial year to Anno Domini

Description

wareki2AD calculates a year for Anno Domini from Japanese imperial year, which is widely used in official statistics and documents in Japan.

Usage

wareki2AD(year)

Arguments

year

vector of Japanese calender year as strings.

Value

character

Details

year should include numeric strings as a halfwidth (hankaku) forms (aka ACSII). If you have fullwidth (zenkaku) figures in the numeric part of year, you need to convert them to halfwidth characters before using wareki2AD.

Noted that the supported the names of an era, ``gengo'', inlcude ``Meiji'', ``Taisho'', ``Showa'', and ``Heisei'' only.

Examples

Run this code
# NOT RUN {
yr <- paste0(intToUtf8(c(24179,25104)), 20, intToUtf8(24180))
wareki2AD(yr)
# }

Run the code above in your browser using DataLab