/** * Sets to the first possible moment that matches the given * specification. */ private void _setToFirstMoment() { // 1584 was the first leap year during which the Gregorian // calendar was in use: seems like the most reasonable "first" // year to use in absence of a year. if (!hasYear()) setYear(1584); if (!hasMonth()) setMonth(1); if (!hasDay()) setDay(1); if (!hasTime()) setTime(0, 0, 0, GDate._zero); }
protected void set_int(int v) { int code = schemaType().getPrimitiveType().getBuiltinTypeCode(); if (code != SchemaType.BTC_G_DAY && code != SchemaType.BTC_G_MONTH && code != SchemaType.BTC_G_YEAR) throw new XmlValueOutOfRangeException(); GDateBuilder value = new GDateBuilder(); switch (code) { case SchemaType.BTC_G_DAY: value.setDay(v); break; case SchemaType.BTC_G_MONTH: value.setMonth(v); break; case SchemaType.BTC_G_YEAR: value.setYear(v); break; } if (_validateOnSet()) validateValue(value, _schemaType, _voorVc); _value = value.toGDate(); }
/** * Construts a GDateBuilder by copying another GDateSpecificaiton. */ public GDateBuilder(GDateSpecification gdate) { if (gdate.hasTimeZone()) setTimeZone(gdate.getTimeZoneSign(), gdate.getTimeZoneHour(), gdate.getTimeZoneMinute()); if (gdate.hasTime()) setTime(gdate.getHour(), gdate.getMinute(), gdate.getSecond(), gdate.getFraction()); if (gdate.hasDay()) setDay(gdate.getDay()); if (gdate.hasMonth()) setMonth(gdate.getMonth()); if (gdate.hasYear()) setYear(gdate.getYear()); }
pdate.setMonth(02); pdate.setDay(29);
/** * Sets to the first possible moment that matches the given * specification. */ private void _setToFirstMoment() { // 1584 was the first leap year during which the Gregorian // calendar was in use: seems like the most reasonable "first" // year to use in absence of a year. if (!hasYear()) setYear(1584); if (!hasMonth()) setMonth(1); if (!hasDay()) setDay(1); if (!hasTime()) setTime(0, 0, 0, GDate._zero); }
/** * Sets to the first possible moment that matches the given * specification. */ private void _setToFirstMoment() { // 1584 was the first leap year during which the Gregorian // calendar was in use: seems like the most reasonable "first" // year to use in absence of a year. if (!hasYear()) setYear(1584); if (!hasMonth()) setMonth(1); if (!hasDay()) setDay(1); if (!hasTime()) setTime(0, 0, 0, GDate._zero); }
protected void set_int(int v) { int code = schemaType().getPrimitiveType().getBuiltinTypeCode(); if (code != SchemaType.BTC_G_DAY && code != SchemaType.BTC_G_MONTH && code != SchemaType.BTC_G_YEAR) throw new XmlValueOutOfRangeException(); GDateBuilder value = new GDateBuilder(); switch (code) { case SchemaType.BTC_G_DAY: value.setDay(v); break; case SchemaType.BTC_G_MONTH: value.setMonth(v); break; case SchemaType.BTC_G_YEAR: value.setYear(v); break; } if (_validateOnSet()) validateValue(value, _schemaType, _voorVc); _value = value.toGDate(); }
protected void set_int(int v) { int code = schemaType().getPrimitiveType().getBuiltinTypeCode(); if (code != SchemaType.BTC_G_DAY && code != SchemaType.BTC_G_MONTH && code != SchemaType.BTC_G_YEAR) throw new XmlValueOutOfRangeException(); GDateBuilder value = new GDateBuilder(); switch (code) { case SchemaType.BTC_G_DAY: value.setDay(v); break; case SchemaType.BTC_G_MONTH: value.setMonth(v); break; case SchemaType.BTC_G_YEAR: value.setYear(v); break; } if (_validateOnSet()) validateValue(value, _schemaType, _voorVc); _value = value.toGDate(); }
/** * Construts a GDateBuilder by copying another GDateSpecificaiton. */ public GDateBuilder(GDateSpecification gdate) { if (gdate.hasTimeZone()) setTimeZone(gdate.getTimeZoneSign(), gdate.getTimeZoneHour(), gdate.getTimeZoneMinute()); if (gdate.hasTime()) setTime(gdate.getHour(), gdate.getMinute(), gdate.getSecond(), gdate.getFraction()); if (gdate.hasDay()) setDay(gdate.getDay()); if (gdate.hasMonth()) setMonth(gdate.getMonth()); if (gdate.hasYear()) setYear(gdate.getYear()); }
/** * Construts a GDateBuilder by copying another GDateSpecificaiton. */ public GDateBuilder(GDateSpecification gdate) { if (gdate.hasTimeZone()) setTimeZone(gdate.getTimeZoneSign(), gdate.getTimeZoneHour(), gdate.getTimeZoneMinute()); if (gdate.hasTime()) setTime(gdate.getHour(), gdate.getMinute(), gdate.getSecond(), gdate.getFraction()); if (gdate.hasDay()) setDay(gdate.getDay()); if (gdate.hasMonth()) setMonth(gdate.getMonth()); if (gdate.hasYear()) setYear(gdate.getYear()); }
pdate.setMonth(02); pdate.setDay(29);
pdate.setMonth(02); pdate.setDay(29);