from dateutil.parser import parse
parse(‘2m’) - treating it as a datetime
I’m testing a few terms like 2w, 2y, 2m and some other date formats received in a string to check whether a given string has a date of any format. Everything works fine except ‘2m’ It’s treating it as 2 minutes past, I don’t want to treat it as a date format.
Please can anyone help to resolve this issue