Description
Describe the bug
while working on a project where I use Dayjs in, I have noticed that all meridiem uses Arabic locales are reversed.
I have looked into the source code in Github and found
meridiem: hour => (hour > 12 ? 'ص' : 'م'),
which at first look it looks fine! but Arabic letters has a weird behavior when written in one line with English letters, it tends to flip around. because Arabic write from right to left.
Although it looks like it should return "م" when hours are more than 12, but it returns "ص" which is reversed!.
Expected behavior
returning 'م' when hour>12 is true
returning 'ص' when hour>12 is false
but what is happening is the reverse since Arabic letters read from write to left
Fix
Using if else instead of ternary operator, because ternary operator tend to flip the output when used with Arabic (becase its read from right to left)
I'm ready to make a pull request if you agree, let me know what you think. thanks.
Information
- Day.js Version latest
- OS: windows 11
- Browser [chrome latest]