I have a String that represents a date in French locale : 09-oct-08 :
I need to parse that String so I came up with this SimpleDa
I was having the same problem (french and the extra dots) and I believe the right way to solve this problem is by globally overwriting the french locale like so:
import moment from 'moment';
moment.locale('fr', { monthsShort: 'janv_févr_mars_avr_mai_juin_juil_août_sept_oct_nov_déc'.split('_') });
The original monthsShort french object has the dots like
janv._févr._mars_avr._..., so we're just removing them.
Here's a link to docs where you can check what can be overwritten.
Note that we don't need to pass a complete locale object if we just want to overwrite ie.: monthsShort.