is_valid_date
- bidsaid.path_utils.is_valid_date(date_str, date_fmt)[source]
Determine if a string is a valid date based on format.
Parameters
- date_str
str The string to be validated.
- date_fmt
str The expected format of the date.
Return
- bool
True if
date_strhas the format specified bydate_fmt.
Example
>>> from bidsaid.metadata import is_valid_date >>> is_valid_date("241010", "%y%m%d") True
- date_str