andrewplummer / Sugar

A Javascript library for working with native objects.
https://sugarjs.com/
MIT License
4.53k stars 305 forks source link

Modifying an existing format / Adding a format for all Locales #673

Open Jouroumy opened 3 years ago

Jouroumy commented 3 years ago

Hi, I actually tried to get dates with this format (04.05 -> 5 april ) but it returns that as an hour I tried to do Sugar.Date.getLocale('en').addFormat('{month}\.{day}') and also tried without the backslash

And I have another questions, I am actually working with multiples languages and I wanted to know if there is a way to add new format for multiple languages I tried this, but it doesn't work Sugar.Date.getAllLocales().addFormat({month}-{day})

Thanks for your answer