Skip to contents

Clean Year of Birth

Usage

clean.YoB(YoB)

Arguments

YoB

string with date of birth-like data information

Value

integer with the determined year of birth

Examples

clean.YoB("1969")
#> [1] 1969
# 1969

clean.YoB("01/23/1969")
#> [1] 1969
# 1969

clean.YoB("01/23/69")
#> [1] 1969
# 1969

clean.YoB("23 January 1969")
#> [1] 1969
# 1969

clean.YoB("19690123")
#> [1] 1969
# 1969

clean.YoB("69")
#> [1] 1969
# 1969