Create a XMLGregorianCalendar Without Time Component.

@param cal The initial Calendar
@return An XMLGregorianCalendar
515296
public XMLGregorianCalendar buildXMLGregorianCalendarDate(Calendar cal) {
        XMLGregorianCalendar result = null;
        if (cal != null) {
            result = newXMLGregorianCalendar(cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.MONTH) + 1,
                    cal.get(Calendar.YEAR));
        }
        return result;
    }
447884
@Nullable
  public static XMLGregorianCalendar getXMLCalendar (@Nullable final LocalDateTime aBase)
  {
    if (aBase == null)
      return null;
    return s_aDTFactory.newXMLGregorianCalendar (aBase.getYear (),
                                                 aBase.getMonth ().getValue (),
                                                 aBase.getDayOfMonth (),
                                                 aBase.getHour (),
                                                 aBase.getMinute (),
                                                 aBase.getSecond (),
                                                 aBase.get (ChronoField.MILLI_OF_SECOND),
                                                 DatatypeConstants.FIELD_UNDEFINED);
  }
320992
public static XMLGregorianCalendar timeStamp(Date date) {
		GregorianCalendar gc = new GregorianCalendar();
		gc.setTime(date);
		return xmlDatatypeFactory.newXMLGregorianCalendar(gc);
	}
1372923
@Nullable
  public static LocalTime getLocalTime (@Nullable final XMLGregorianCalendar aCal)
  {
    if (aCal == null)
      return null;
    return getGregorianCalendar (aCal).toZonedDateTime ().toLocalTime ();
  }
363579
@Nullable
  public static XMLGregorianCalendar getXMLCalendarDate (@Nullable final GregorianCalendar aBase)
  {
    if (aBase == null)
      return null;
    // Month in XMLGregorianCalendar is 1-based! Fix in 9.1.8
    return s_aDTFactory.newXMLGregorianCalendarDate (aBase.get (Calendar.YEAR),
                                                     aBase.get (Calendar.MONTH) + 1,
                                                     aBase.get (Calendar.DAY_OF_MONTH),
                                                     getTimezoneOffsetInMinutes (aBase));
  }
1000733
public static Calendar createCalendar(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        return cal;
    }
737378
public Document.Calendars.Calendar.ExceptedDays.ExceptedDay.TimePeriods createDocumentCalendarsCalendarExceptedDaysExceptedDayTimePeriods()
   {
      return new Document.Calendars.Calendar.ExceptedDays.ExceptedDay.TimePeriods();
   }
866618
function createCalendar() {
    $calendarInit1 = $calendarInit2 = $calendarxCaldecl = $calendarStart = $calendar = null;
    switch( $this->format ) {
      case 'xcal':
        $calendarInit1 = '<?xml version="1.0" encoding="UTF-8"?>'.$this->nl.
                         '<!DOCTYPE iCalendar PUBLIC "-//IETF//DTD XCAL/iCalendar XML//EN"'.$this->nl.
                         '"http://www.ietf.org/internet-drafts/draft-ietf-calsch-many-xcal-01.txt"';
        $calendarInit2 = '>'.$this->nl;
        $calendarStart = '<vcalendar';
        break;
      default:
        $calendarStart = 'BEGIN:VCALENDAR'.$this->nl;
        break;
    }
    $calendarStart .= $this->createCalscale();
    $calendarStart .= $this->createMethod();
    $calendarStart .= $this->createProdid();
    $calendarStart .= $this->createVersion();
    switch( $this->format ) {
      case 'xcal':
        $nlstrlen = strlen( $this->nl );
        if( $this->nl == substr( $calendarStart, ( 0 - $nlstrlen )))
          $calendarStart = substr( $calendarStart, 0, ( strlen( $calendarStart ) - $nlstrlen ));
        $calendarStart .= '>'.$this->nl;
        break;
      default:
        break;
    }
    $calendar .= $this->createXprop();
    foreach( $this->components as $component ) {
      if( '' >= $component->getConfig( 'language'))
        $component->setConfig( 'language',  $this->getConfig( 'language' ));
      $component->setConfig( 'allowEmpty',  $this->getConfig( 'allowEmpty' ));
      $component->setConfig( 'nl',          $this->getConfig( 'nl' ));
      $component->setConfig( 'unique_id',   $this->getConfig( 'unique_id' ));
      $component->setConfig( 'format',      $this->getConfig( 'format' ));
      $calendar .= $component->createComponent( $this->xcaldecl );
    }
    if(( 0 < count( $this->xcaldecl )) && ( 'xcal' == $this->format )) { // xCal only
      $calendarInit1 .= $this->nl.'['.$this->nl;
      $old_xcaldecl = array();
      foreach( $this->xcaldecl as $declix => $declPart ) {
        if(( 0 < count( $old_xcaldecl)) &&
           ( in_array( $declPart['uri'],      $old_xcaldecl['uri'] )) &&
           ( in_array( $declPart['external'], $old_xcaldecl['external'] )))
          continue; // no duplicate uri and ext. references
        $calendarxCaldecl .= '<!';
        foreach( $declPart as $declKey => $declValue ) {
          switch( $declKey ) {                    // index
            case 'xmldecl':                       // no 1
              $calendarxCaldecl .= $declValue.' ';
              break;
            case 'uri':                           // no 2
              $calendarxCaldecl .= $declValue.' ';
              $old_xcaldecl['uri'][] = $declValue;
              break;
            case 'ref':                           // no 3
              $calendarxCaldecl .= $declValue.' ';
              break;
            case 'external':                      // no 4
              $calendarxCaldecl .= '"'.$declValue.'" ';
              $old_xcaldecl['external'][] = $declValue;
              break;
            case 'type':                          // no 5
              $calendarxCaldecl .= $declValue.' ';
              break;
            case 'type2':                         // no 6
              $calendarxCaldecl .= $declValue;
              break;
          }
        }
        $calendarxCaldecl .= '>'.$this->nl;
      }
      $calendarInit2 = ']'.$calendarInit2;
    }
    switch( $this->format ) {
      case 'xcal':
        $calendar .= '</vcalendar>'.$this->nl;
        break;
      default:
        $calendar .= 'END:VCALENDAR'.$this->nl;
        break;
    }
    return $calendarInit1.$calendarxCaldecl.$calendarInit2.$calendarStart.$calendar;
  }
289302
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "realizationEpoch")
    public JAXBElement<XMLGregorianCalendar> createRealizationEpoch(XMLGregorianCalendar value) {
        return new JAXBElement<XMLGregorianCalendar>(_RealizationEpoch_QNAME, XMLGregorianCalendar.class, null, value);
    }
368974
public Calendar toCalendar(TimeZone zone, Locale locale) {
		if (null == locale) {
			locale = Locale.getDefault(Locale.Category.FORMAT);
		}
		final Calendar cal = (null != zone) ? Calendar.getInstance(zone, locale) : Calendar.getInstance(locale);
		cal.setFirstDayOfWeek(firstDayOfWeek.getValue());
		cal.setTime(this);
		return cal;
	}
287123
private XMLGregorianCalendar createCalendar(Long timestamp) throws Exception {
        DatatypeFactory df = DatatypeFactory.newInstance();
        GregorianCalendar cal = new GregorianCalendar();
        cal.setTimeInMillis(timestamp != null ? timestamp.longValue() : System.currentTimeMillis());
        return df.newXMLGregorianCalendar(cal);
    }
1094486
@Nullable
  public static XMLGregorianCalendar getXMLCalendarDate (@Nullable final Date aBase)
  {
    if (aBase == null)
      return null;
    return getXMLCalendarDate (getCalendar (aBase));
  }
1052940
@Nullable
  public static XMLGregorianCalendar getXMLCalendarDate (@Nullable final XMLGregorianCalendar aBase)
  {
    if (aBase == null)
      return null;
    return s_aDTFactory.newXMLGregorianCalendarDate (aBase.getYear (),
                                                     aBase.getMonth (),
                                                     aBase.getDay (),
                                                     aBase.getTimezone () == 0 ? DatatypeConstants.FIELD_UNDEFINED
                                                                               : aBase.getTimezone ());
  }
448549
@Nullable
  public static XMLGregorianCalendar getXMLCalendarTime (@Nullable final GregorianCalendar aBase)
  {
    if (aBase == null)
      return null;
    return s_aDTFactory.newXMLGregorianCalendarTime (aBase.get (Calendar.HOUR_OF_DAY),
                                                     aBase.get (Calendar.MINUTE),
                                                     aBase.get (Calendar.SECOND),
                                                     aBase.get (Calendar.MILLISECOND),
                                                     getTimezoneOffsetInMinutes (aBase));
  }
8783
public XMLGregorianCalendar newGMonthDay(int month, int day) {
        XMLGregorianCalendar cal=dataFactory.newXMLGregorianCalendar();
        cal.setMonth(month);
        cal.setDay(day);
        return cal;
    }
30140
@CheckForSigned
  public static long getMillis (@Nullable final XMLGregorianCalendar aCal)
  {
    final GregorianCalendar aGregorianCalendar = getGregorianCalendar (aCal);
    return aGregorianCalendar == null ? CGlobal.ILLEGAL_ULONG : aGregorianCalendar.getTimeInMillis ();
  }
363126
public XMLGregorianCalendar newGYear(int year) {
        XMLGregorianCalendar cal=dataFactory.newXMLGregorianCalendar();
        cal.setYear(year);
        return cal;
    }