Translates The User's Time Keywords Into Valid Ones
Source:R/utils_time_keywords_translate.R
utils_time_keywords_translate.Rd
Internal function to translate misnamed or abbreviated keywords into valid ones. Uses utils_time_keywords_dictionary()
as reference dictionary.
See also
Other internal_time_handling:
utils_as_time()
,
utils_coerce_time_class()
,
utils_is_time()
,
utils_new_time()
,
utils_time_keywords()
,
utils_time_keywords_dictionary()
,
utils_time_units()
Examples
#millennia
utils_time_keywords_translate(
keyword = "1000 years"
)
#> [1] "millennia"
utils_time_keywords_translate(
keyword = "1000 y"
)
#> [1] "millennia"
utils_time_keywords_translate(
keyword = "thousands"
)
#> [1] "millennia"
#years
utils_time_keywords_translate(
keyword = "year"
)
#> [1] "years"
utils_time_keywords_translate(
keyword = "y"
)
#> [1] "years"
#days
utils_time_keywords_translate(
keyword = "d"
)
#> [1] "days"
utils_time_keywords_translate(
keyword = "day"
)
#> [1] "days"
#seconds
utils_time_keywords_translate(
keyword = "s"
)
#> [1] "seconds"
utils_time_keywords_translate(
keyword = "sec"
)
#> [1] "seconds"