inspect_birthmonth {trustmebro}R Documentation

Inspect birthmonth-component of a string

Description

Check whether a given string contains exactly one two-digit number that represents a valid month of the year (between 01 and 12). The string is assumed to be a code (e.g., a SGIC), which may include letters and digits.

Usage

inspect_birthmonth(code)

Arguments

code

A character string containing a SGIC or similar code that may include a numeric birth month-component.

Value

A logical value: 'TRUE' if the string contains only one valid birth month-component (between 01 and 12), otherwise 'FALSE'.

Examples

inspect_birthday("DEF66") # FALSE - 66 is not a valid month
inspect_birthday("GHI02") # TRUE - 02 (February) is a valid month
inspect_birthday("ABC12DEF10") # FALSE - Multiple numeric components
inspect_birthday("XYZ") # FALSE - No numeric component
inspect_birthday("JKL11") # TRUE - 11 (November) is a valid day

[Package trustmebro version 1.0.0 Index]