uribo / zipangu

Japanese utility functions and data
https://uribo.github.io/zipangu
Other
56 stars 7 forks source link

Strict checking of `is_jyear()` #22

Closed uribo closed 3 years ago

uribo commented 4 years ago
zipangu:::is_jyear(c("令和元年", "Reiwa2", 
           # 存在しない元号
           "reima3"))
#> [1] TRUE TRUE TRUE

convert_jyear("Reima3")
[1] 2021

Created on 2020-07-13 by the reprex package (v0.3.0)

jyear_sets$reiwa$roman_capitalr とマッチしてTRUEを返してしまう。