本文整理了Java中com.google.api.services.calendar.model.Event.setEnd()
方法的一些代码示例,展示了Event.setEnd()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.setEnd()
方法的具体详情如下:
包路径:com.google.api.services.calendar.model.Event
类名称:Event
方法名:setEnd
暂无
代码示例来源:origin: google/data-transfer-project
static Event convertToGoogleCalendarEvent(CalendarEventModel eventModel) {
Event event = new Event()
.setLocation(eventModel.getLocation())
.setDescription(eventModel.getTitle())
.setSummary(eventModel.getNotes())
.setStart(getEventDateTime(eventModel.getStartTime()))
.setEnd(getEventDateTime(eventModel.getEndTime()));
if (eventModel.getAttendees() != null) {
event.setAttendees(eventModel.getAttendees().stream()
.map(GoogleCalendarImporter::transformToEventAttendee)
.collect(Collectors.toList()));
}
return event;
}
代码示例来源:origin: google/google-api-java-client-samples
private static Event newEvent() {
Event event = new Event();
event.setSummary("New Event");
Date startDate = new Date();
Date endDate = new Date(startDate.getTime() + 3600000);
DateTime start = new DateTime(startDate, TimeZone.getTimeZone("UTC"));
event.setStart(new EventDateTime().setDateTime(start));
DateTime end = new DateTime(endDate, TimeZone.getTimeZone("UTC"));
event.setEnd(new EventDateTime().setDateTime(end));
return event;
}
代码示例来源:origin: io.syndesis.connector/connector-google-calendar
Date endMidDate = dateFormat.parse(composedTime);
DateTime end = new DateTime(endMidDate);
event.setEnd(new EventDateTime().setDateTime(end));
} else {
composedTime = endDate;
DateTime endDateTime = new DateTime(composedTime);
EventDateTime endEventDateTime = new EventDateTime().setDate(endDateTime);
event.setEnd(endEventDateTime);
代码示例来源:origin: io.syndesis.connector/connector-google-calendar
Date endMidDate = dateFormat.parse(composedTime);
DateTime end = new DateTime(endMidDate);
event.setEnd(new EventDateTime().setDateTime(end));
} else {
composedTime = endDate;
DateTime endDateTime = new DateTime(composedTime);
EventDateTime endEventDateTime = new EventDateTime().setDate(endDateTime);
event.setEnd(endEventDateTime);
代码示例来源:origin: NovaFox161/DisCal-Discord-Bot
event.setEnd(end.setTimeZone(cal.getTimeZone()));
代码示例来源:origin: NovaFox161/DisCal-Discord-Bot
event.setEnd(end.setTimeZone(cal.getTimeZone()));
代码示例来源:origin: NovaFox161/DisCal-Discord-Bot
event.setEnd(end.setTimeZone(cal.getTimeZone()));
代码示例来源:origin: NovaFox161/DisCal-Discord-Bot
event.setEnd(end.setTimeZone(cal.getTimeZone()));
代码示例来源:origin: NovaFox161/DisCal-Discord-Bot
event.setEnd(end.setTimeZone(cal.getTimeZone()));
代码示例来源:origin: NovaFox161/DisCal-Discord-Bot
event.setEnd(end.setTimeZone(cal.getTimeZone()));
代码示例来源:origin: synyx/urlaubsverwaltung
private static void fillEvent(Absence absence, Event event) {
event.setSummary(absence.getEventSubject());
EventAttendee eventAttendee = new EventAttendee();
eventAttendee.setEmail(absence.getPerson().getEmail());
eventAttendee.setDisplayName(absence.getPerson().getNiceName());
event.setAttendees(Collections.singletonList(eventAttendee));
EventDateTime startEventDateTime;
EventDateTime endEventDateTime;
if (absence.isAllDay()) {
// To create an all-day event, you must use setDate() having created DateTime objects using a String
DateFormat dateFormat = new SimpleDateFormat(DATE_PATTERN_YYYY_MM_DD);
String startDateStr = dateFormat.format(absence.getStartDate());
String endDateStr = dateFormat.format(absence.getEndDate());
DateTime startDateTime = new DateTime(startDateStr);
DateTime endDateTime = new DateTime(endDateStr);
startEventDateTime = new EventDateTime().setDate(startDateTime);
endEventDateTime = new EventDateTime().setDate(endDateTime);
} else {
DateTime dateTimeStart = new DateTime(absence.getStartDate());
DateTime dateTimeEnd = new DateTime(absence.getEndDate());
startEventDateTime = new EventDateTime().setDateTime(dateTimeStart);
endEventDateTime = new EventDateTime().setDateTime(dateTimeEnd);
}
event.setStart(startEventDateTime);
event.setEnd(endEventDateTime);
}
代码示例来源:origin: gdenning/exchange-sync
event.setDescription(appointmentDto.getDescription());
event.setStart(convertToEventDateTime(appointmentDto.getStart(), appointmentDto.isAllDay(), calendarTimeZone));
event.setEnd(convertToEventDateTime(appointmentDto.getEnd(), appointmentDto.isAllDay(), calendarTimeZone));
event.setLocation(appointmentDto.getLocation());
if (syncOrganizerAndAttendees) {
内容来源于网络,如有侵权,请联系作者删除!