Posted 16 October 2018, 3:56 am EST
In our project (and in the inspector) if I execute the following code, the short date is not formatted properly.
var fr_CA = new GC.Spread.Common.CultureInfo();
fr_CA.NumberFormat.currencySymbol = "$"
fr_CA.NumberFormat.numberDecimalSeparator = ",";
fr_CA.NumberFormat.numberGroupSeparator = " ";
fr_CA.NumberFormat.arrayGroupSeparator = ";";
fr_CA.NumberFormat.arrayListSeparator = "\\";
fr_CA.NumberFormat.listSeparator = ";";
fr_CA.DateTimeFormat.amDesignator = "AM";
fr_CA.DateTimeFormat.pmDesignator = "PM";
fr_CA.DateTimeFormat.abbreviatedMonthNames = ["Jan", "Fev", "Mars", "Avr", "Mai", "Jun", "Jul", "Aout", "Sep", "Oct", "Nov", "Dec", ""];
fr_CA.DateTimeFormat.abbreviatedMonthGenitiveNames = ["Jan", "Fev", "Mars", "Avr", "Mai", "Jun", "Jul", "Aout", "Sep", "Oct", "Nov", "Dec", ""];
fr_CA.DateTimeFormat.abbreviatedDayNames = ["Di", "Lu", "Ma", "Me", "Je", "Ve", "Sa"];
fr_CA.DateTimeFormat.dayNames = ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"];
fr_CA.DateTimeFormat.fullDateTimePattern = "EEEE d MMMM yyyy";
fr_CA.DateTimeFormat.longDatePattern = "d MMMM yyyy";
fr_CA.DateTimeFormat.longTimePattern = "HH:mm:ss";
fr_CA.DateTimeFormat.monthDayPattern = "dd MMMM";
fr_CA.DateTimeFormat.monthNames = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre", ""];
fr_CA.DateTimeFormat.monthGenitiveNames = ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre", ""];
fr_CA.DateTimeFormat.shortDatePattern = "yyyy-MM-dd";
fr_CA.DateTimeFormat.shortTimePattern = "HH:mm";
fr_CA.DateTimeFormat.yearMonthPattern = "MMMM yyyy";
GC.Spread.Common.CultureManager.addCultureInfo("fr-CA", fr_CA);
GC.Spread.Common.CultureManager.culture("fr-CA");
When we add amDesignator and pmDesignator, the format seems to add “/” to the short date, when left empty, the date is written without any separator.
In all cases, it does not seem to take account for the shortDatePattern.
Is there known issues or are we doing somthing wrong?
Thanks