Reputation: 29
This is an example Arabic date: (٢٠٢٢-٠٦-٠٤T٠٥:١٠:٠٢+03:00) when I try to convert it from iso format to a regular readable date it gives this error
date = '٢٠٢٢-٠٦-٠٤T٠٥:١٠:٠٢+03:00'
date = datetime.datetime.fromisoformat(date)
ValueError: Invalid isoformat string: '٢٠٢٢-٠٦-٠٤T٠٥:١٠:٠٢+03:00'
I need to translate Arabic numbers into regular numbers in order for this to work, I have tested google translating this date to english and it worked so it is possible. I couldn't find a way to do this using datetime.
Upvotes: 0
Views: 505