Regarding Expiry contract symbol

I am planning to take trade logs from a website and push it through Fyers API to my account. I have a small issue regarding Index option contract symbol. As I read in Fyers API docs, I could see that the weekly option contracts have " {Ex}:{Ex_UnderlyingSymbol}{YY}{M}{dd}{Strike}{Opt_Type}" and monthly contracts have “{Ex}:{Ex_UnderlyingSymbol}{YY}{MMM}{Strike}{Opt_Type}” this as symbol input. The issue is that the website provides trades with symbol “date-month-strike”. I could convert it for weekly but it would be confusing for monthly. What is the workaround for this?

it is not confusing, that is why there are 2 symbol formats for weekly and monthly. Go with the same flow and convert from your source.

If you have doubt, lookup the symbol in symbol master or maintain your own table with expiry dates.