Change months in English to a month number. E.g. March to 3. You should use this function instead of %B or %b because these only work well on a computer set to the English language.

eng_months_to_nr(x)

Arguments

x

character. (abbreviated) month names

Value

character

Examples

eng_months_to_nr(c("January", "Feb", "Apr", "May"))
#> [1] "1" "2" "4" "5"