Sugar icon indicating copy to clipboard operation
Sugar copied to clipboard

Please add support for Indian English variant (en-IN)

Open jikamens opened this issue 5 years ago • 5 comments

One of my users would like to use en-IN as his locale and have date parsing work properly (i.e., parse dates as dd/mm rather than mm/dd). Right now SugarJS doesn't know about en-IN. Any chance of adding it?

jikamens avatar Feb 06 '19 19:02 jikamens

Hello sorry for the delay... actually if you simply set the locale to en-IN it should work. Sugar has en-US as the default (with many apologies), but has a workaround to ONLY parse nn/nn as mm/dd if the locale is explicitly en-US ... any other en- locale should parse as dd/mm.

andrewplummer avatar Mar 07 '19 00:03 andrewplummer

if you simply set the locale to en-IN it should work

Nope, it doesn't.

image

jikamens avatar Mar 07 '19 03:03 jikamens

Ok well damn... I think I was just hoping it would work that way...seems en-GB and en-AU only do that... I will add but as a workaround for now you can use en-GB.

andrewplummer avatar Mar 11 '19 23:03 andrewplummer

Yeah I already told him to do that. ;-)

jikamens avatar Mar 11 '19 23:03 jikamens

Ok cool.... I'll also add other commonwealth countries here like en-IE, en-NZ etc... however looking at it now it creates new objects in memory and I'd prefer to refactor to avoid that... anyway will look into it!

andrewplummer avatar Mar 12 '19 00:03 andrewplummer