delete fNumberFormat;
fNumberFormat = newNumberFormat;
newNumberFormat->setParseIntegerOnly(TRUE);
+ newNumberFormat->setGroupingUsed(FALSE);
}
//----------------------------------------------------------------------
// *** Here's the key: We don't want to have to do THIS:
// nf->setParseIntegerOnly(TRUE);
+ // or this (with changes to fr_CH per cldrbug:9370):
+ // nf->setGroupingUsed(FALSE);
+ // so they are done in DateFormat::adoptNumberFormat
// create the DateFormat
DateFormat *df = DateFormat::createDateInstance(DateFormat::kShort, loc);
*/
public void setNumberFormat(NumberFormat newNumberFormat)
{
- this.numberFormat = newNumberFormat;
+ this.numberFormat = (NumberFormat)newNumberFormat.clone();
/*In order to parse String like "11.10.2001" to DateTime correctly
in Locale("fr","CH") [Richard/GCL]
*/
this.numberFormat.setParseIntegerOnly(true);
+ this.numberFormat.setGroupingUsed(false);
}
/**
// *** Here's the key: We don't want to have to do THIS:
//nf.setParseIntegerOnly(true);
- // However with changes to fr_CH per cldrbug:9370 we have to do the following:
- nf.setGroupingUsed(false);
+ // or this (with changes to fr_CH per cldrbug:9370):
+ //nf.setGroupingUsed(false);
+ // so they are done in DateFormat.setNumberFormat
// create the DateFormat
DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, loc);