I want to convert a time string to Arabic. For example I want to convert 10:00 PM to مساءاً ١٠:٠٠. I am using format function with locale.
import ar from 'date-fns/locale/ar-SA'
...
str = format(date, 'h:mm a', {locale: ar})
But it gives a string like this 10:00 م. Basically digits are not getting translated.