if (XMLConstants.G_MONTH_QNAME.equals(schemaTypeQName)) {
xgc.setMonth(cal.get(Calendar.MONTH) + 1);
// Note: 'XML Schema: Datatypes' indicates that the lexical representation is "--MM--"
// but the truncated representation as described in 5.2.1.3 of ISO 8601:1988 is "--MM".
// We always want to return the 1.6 syntax ("--MM").
String xmlFormat = xgc.toXMLFormat();
String pre = xmlFormat.substring(0, 4); // will always be --MM
String post = "";
// --MM or --MM--
if (xmlFormat.length() == 4 && xmlFormat.length() == 6) {