Is there any better way for getting only day and month from a date including location appropriate separator?
I have a solution that gets separator first:
You can try the regex below and check if it works for you.I tried with different locale it was working as expeted
dateFormat.replace(/Y/ig, ' ').replace(/^\W{1,}|\W{1,}$|\W{3,3}/, '');