Package net.fortuna.ical4j.model

Examples of net.fortuna.ical4j.model.DateTime


    protected static Completed toCompleted(Timestamp javaObj) {
        if (javaObj == null) {
            return null;
        }
        return new Completed(new DateTime(javaObj));
    }
View Full Code Here


    protected static Created toCreated(Timestamp javaObj) {
        if (javaObj == null) {
            return null;
        }
        return new Created(new DateTime(javaObj));
    }
View Full Code Here

    protected static DtEnd toDtEnd(Timestamp javaObj) {
        if (javaObj == null) {
            return null;
        }
        return new DtEnd(new DateTime(javaObj));
    }
View Full Code Here

    protected static DtStart toDtStart(Timestamp javaObj) {
        if (javaObj == null) {
            return null;
        }
        return new DtStart(new DateTime(javaObj));
    }
View Full Code Here

    protected static LastModified toLastModified(Timestamp javaObj) {
        if (javaObj == null) {
            return null;
        }
        return new LastModified(new DateTime(javaObj));
    }
View Full Code Here

        endDate.set(java.util.Calendar.SECOND, 0);

        // Create the event
        PropertyList propertyList = new PropertyList();
        propertyList.add(new DtStamp("20130324T180000Z"));
        propertyList.add(new DtStart(new DateTime(startDate.getTime())));
        propertyList.add(new DtEnd(new DateTime(endDate.getTime())));
        propertyList.add(new Summary("Progress Meeting"));
        VEvent meeting = new VEvent(propertyList);

        // add timezone info..
        meeting.getProperties().add(tz.getTimeZoneId());
View Full Code Here

                description = "";
            }
            java.util.Calendar c = DateUtil.toCalendar(nicolive.getOpenTime());
            c.setTimeZone(timezone);
            properties.add(new Description(description));
            properties.add(new DtStart(new DateTime(c.getTime()), true));
            properties.add(new DtEnd(new DateTime(c.getTime()), true));
            try {
                URI uri = new URI(nicolive.getLink().getValue());
                properties.add(new Url(uri));
            } catch (URISyntaxException e) {
                LOGGER.warning(e.getMessage());
View Full Code Here

    TimeZoneRegistry registry = TimeZoneRegistryFactory.getInstance().createRegistry();
   
    TimeZone timeZone = registry.getTimeZone(normalTimeZone.getID());

    DateTime start = new DateTime(startDate);
    start.setTimeZone(timeZone);
    DateTime end = new DateTime(endDate);
    end.setTimeZone(timeZone);
   
    VEvent meeting = new VEvent(start, end, name);

    meeting.getProperties().add(new Description(description));
    meeting.getProperties().add(new Sequence(0));
View Full Code Here

      }
    }
   
    Period period = null;
    try {
      DateTime from = new DateTime(startYear + "0101T000000Z");
      DateTime to = new DateTime(endYear + "1231T000000Z");;
      period = new Period(from, to);
     
    } catch (ParseException e) {
      _logger.log(Level.SEVERE, "Invalid start or end year: " + startYear + ", " + endYear, e);
      return holidays;
    }
   
    for (Object  component : _holidayCalendar.getComponents(VEVENT)) {
      Component vevent = (Component) component;
      String summary = vevent.getProperty(SUMMARY).getValue();
      if(summary.equals(eventSummary)) {
        PeriodList list = vevent.calculateRecurrenceSet(period);
        for(Object p : list) {
          DateTime date = ((Period) p).getStart();
         
          // this date is at the date of the holiday at 12 AM UTC
          Calendar utcCal = CalendarSource.getCurrentCalendar();
          utcCal.setTimeZone(TimeZone.getTimeZone(GMT));
          utcCal.setTime(date);
View Full Code Here

        endDate.set(java.util.Calendar.SECOND, 0);

        // Create the event
        PropertyList propertyList = new PropertyList();
        propertyList.add(new DtStamp("20130324T180000Z"));
        propertyList.add(new DtStart(new DateTime(startDate.getTime())));
        propertyList.add(new DtEnd(new DateTime(endDate.getTime())));
        propertyList.add(new Summary("Progress Meeting"));
        VEvent meeting = new VEvent(propertyList);

        // add timezone info..
        meeting.getProperties().add(tz.getTimeZoneId());
View Full Code Here

TOP

Related Classes of net.fortuna.ical4j.model.DateTime

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.