// hack to trap & fix varchar mystery goop coming out of mysql datetimes try { return variables.aDateFormat.getDateInstance(variables.aDateFormat[arguments.style],variables.thisLocale).format(arguments.date); } catch(Any e) { variables.aCalendar.setTime(arguments.date); return variables.aDateFormat.getDateInstance(variables.aDateFormat[arguments.style],variables.thisLocale).format(variables.aCalendar.getTime()); } var i=0; var theseLocales=arrayNew(1); var orgLocales = ""; if ( server.coldfusion.productname eq "bluedragon" ) { // this is only needed for BD.NET, but works for BD Java editions also orgLocales=createObject("java","com.nary.util.Locales").getAvailableLocales(); } else { orgLocales=createObject("java","java.util.Locale").getAvailableLocales(); } // we skip plain languages, en, fr, ar, etc. for (i=1; i LTE arrayLen(orgLocales); i=i+1) { if (listLen(orgLocales[i].toString(),"_") GT 1) { arrayAppend(theseLocales,orgLocales[i].toString()); } // if } //for return theseLocales; var localizedShortDays=""; var i=0; var tmp=variables.dateSymbols.getShortWeekdays(); // kludge java returns NULL first element in array so can't use arrayDeleteAt tmp=listToArray(arrayToList(tmp)); // more kludge, fixup days to match week start switch (weekStarts()) { case 1: //starts on sunday, just return day names localizedShortDays=tmp; break; case 2: // euro dates, starts on monday needs kludge localizedShortDays=arrayNew(1); localizedShortDays[7]=tmp[1]; //move sunday to last for (i=1; i LTE 6; i=i+1) { localizedShortDays[i]=tmp[i+1]; } break; case 7: // starts saturday, usually arabic, needs kludge localizedShortDays=arrayNew(1); localizedShortDays[1]=tmp[7]; //move saturday to first for (i=1; i LTE 6; i=i+1) { localizedShortDays[i+1]=tmp[i]; } break; } return localizedShortDays; variables.sDateFormat.init("MMMM",variables.thisLocale); return variables.sDateFormat.format(createDate(1999,arguments.month,1)); variables.sDateFormat.init("yyyy",variables.thisLocale); return variables.sDateFormat.init("yyyy",variables.thisLocale).format(createDate(arguments.thisYear,1,1)); // hack to trap & fix varchar mystery goop coming out of mysql datetimes try { return variables.aDateFormat.getTimeInstance(variables.aDateFormat[arguments.style],variables.thisLocale).format(arguments.date); } catch (Any e) { variables.aCalendar.setTime(arguments.date); return variables.aDateFormat.getTimeInstance(variables.aDateFormat[arguments.style],variables.thisLocale).format(variables.aCalendar.getTime()); } // hack to trap & fix varchar mystery goop coming out of mysql datetimes try { return variables.aDateFormat.getDateTimeInstance(variables.aDateFormat[arguments.dateStyle],variables.aDateFormat[arguments.timeStyle],variables.thisLocale).format(arguments.date); } catch (Any e) { variables.aCalendar.setTime(arguments.date); return variables.aDateFormat.getDateTimeInstance(variables.aDateFormat[arguments.dateStyle],variables.aDateFormat[arguments.timeStyle],variables.thisLocale).format(variables.aCalendar.getTime()); } var locales=arrayToList(getAvailableLocales()); return listFind(locales,arguments.thisLocale) gte 1; return variables.aCalendar.getFirstDayOfWeek();