Package net.fortuna.ical4j.model

Examples of net.fortuna.ical4j.model.DateTime


    CompatibilityHints.setHintEnabled(
        CompatibilityHints.KEY_OUTLOOK_COMPATIBILITY, true);
    VEvent meeting = new VEvent();
    meeting.getProperties().add(new Summary(subject));
    meeting.getProperties().add(new Description(content));
    meeting.getProperties().add(new DtStart(new DateTime(start)));
    meeting.getProperties().add(new DtEnd(new DateTime(end)));
    if (location != null) {
      meeting.getProperties().add(new Location(location));
    }

    // generate unique identifier..
View Full Code Here


        Date end;
        if (event.isAllDay()) {
            begin = new Date(event.getBegin().toCalendar(new Locale("pt")).getTime());
            end = new Date(event.getEnd().toCalendar(new Locale("pt")).getTime());
        } else {
            begin = new DateTime(event.getBegin().toCalendar(new Locale("pt")).getTime());
            end = new DateTime(event.getEnd().toCalendar(new Locale("pt")).getTime());
        }
        VEvent vEvent = new VEvent(begin, end, event.getTitle());

        vEvent.getStartDate().setTimeZone(TIMEZONE);
        vEvent.getEndDate().setTimeZone(TIMEZONE);
View Full Code Here

    CompatibilityHints.setHintEnabled(
        CompatibilityHints.KEY_OUTLOOK_COMPATIBILITY, true);
    VEvent meeting = new VEvent();
    meeting.getProperties().add(new Summary(subject));
    meeting.getProperties().add(new Description(content));
    meeting.getProperties().add(new DtStart(new DateTime(start)));
    meeting.getProperties().add(new DtEnd(new DateTime(end)));
    if (location != null) {
      meeting.getProperties().add(new Location(location));
    }

    // generate unique identifier..
View Full Code Here

        if (recur == null) { return null; }
        return getNextRecurringDate(recur, seedDate, startDate);
    }

    private static LocalDate getNextRecurringDate(final Recur recur, final LocalDate seedDate, final LocalDate startDate) {
        final DateTime periodStart = new DateTime(startDate.toDate());
        final Date seed = convertToiCal4JCompatibleDate(seedDate);
        final Date nextRecDate = recur.getNextDate(seed, periodStart);
        return nextRecDate == null ? null : new LocalDate(nextRecDate);
    }
View Full Code Here

    private static Collection<LocalDate> getRecurringDates(final Recur recur, final LocalDate seedDate, final LocalDate periodStartDate,
            final LocalDate periodEndDate, final int maxCount) {
        if (recur == null) { return null; }
        final Date seed = convertToiCal4JCompatibleDate(seedDate);
        final DateTime periodStart = new DateTime(periodStartDate.toDate());
        final DateTime periodEnd = new DateTime(periodEndDate.toDate());

        final Value value = new Value(Value.DATE.getValue());
        final DateList recurringDates = recur.getDates(seed, periodStart, periodEnd, value, maxCount);
        return convertToLocalDateList(recurringDates);
    }
View Full Code Here

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

    // Create the event
    String eventName = "Progress Meeting";
    DateTime start = new DateTime(startDate.getTime());
    DateTime end = new DateTime(endDate.getTime());
    VEvent meeting = new VEvent(start, end, eventName);

    // add timezone info..
    meeting.getProperties().add(tz.getTimeZoneId());
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);

    // add timezone info..
    VTimeZone tz = timeZone.getVTimeZone();
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.