Posted 25 October 2023, 4:17 am EST
Hi there,
I am using some date-time formats in spread Js but it shows some if them as duplicate in it.
let newDateFormats = ["M/d/yyyy HH:mm tt", "M/d/yyyy HH:mm:ss tt", "HH:mm tt", "HH:mm:ss tt",
"dddd, MMMM d, yyyy HH:mm tt", "dddd, MMMM d, yyyy HH:mm:ss tt", "ddd, d MMM yyyy HH:mm tt",
"MMMM, yyyy", "MMMM", "MMM", "MMMM d", "MMMM d, yyyy", "MMM d", "MMM d, yyyy", "MMM, yyyy",
"M-d-yy", "M/d/yy HH:mm:ss tt", "M-d-yy HH:mm:ss tt", "M-d-yy HH:mm tt", "MMM ' yy", "MMM d' yy",
"MMMM", "MMM", "MMMM d", "yyyy",
];
// Get the culture info instance
let culture = new GC.Spread.Common.CultureInfo();
let en_culture = GC.Spread.Common.CultureManager.getCultureInfo('en-us');
culture.predefinedFormats = Object.assign({}, en_culture.predefinedFormats);
// Add new Date formats
culture.predefinedFormats.Date = culture.predefinedFormats.Date.concat(newDateFormats);
// get current culture name
let cultureName = GC.Spread.Common.CultureManager.culture();
//set infos for this culture
GC.Spread.Common.CultureManager.addCultureInfo(cultureName, culture);
How can I fix this