本文整理汇总了Java中biweekly.component.VEvent.setDateTimeStamp方法的典型用法代码示例。如果您正苦于以下问题:Java VEvent.setDateTimeStamp方法的具体用法?Java VEvent.setDateTimeStamp怎么用?Java VEvent.setDateTimeStamp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类biweekly.component.VEvent
的用法示例。
在下文中一共展示了VEvent.setDateTimeStamp方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: jcal_draft_example1
import biweekly.component.VEvent; //导入方法依赖的package包/类
@Test
public void jcal_draft_example1() throws Throwable {
//Note: all whitespace is removed from the expected JSON string it easier to compare it with the actual result
ICalendar ical = new ICalendar();
ical.getProperties().clear();
ical.setCalendarScale(CalendarScale.gregorian());
ical.setProductId("-//ExampleInc.//ExampleCalendar//EN");
{
VEvent event = new VEvent();
event.getProperties().clear();
event.setDateTimeStamp(utc("2008-02-05 19:12:24"));
event.setDateStart(new DateStart(date("2008-10-06"), false));
event.setSummary("Planningmeeting");
event.setUid("4088E990AD89CB3DBB484909");
ical.addEvent(event);
}
assertValidate(ical).versions(V2_0).run();
assertExample(ical, "rfc7265-example1.json");
}
示例2: example1
import biweekly.component.VEvent; //导入方法依赖的package包/类
@Test
public void example1() throws Throwable {
ICalendar ical = new ICalendar();
ical.getProperties().clear();
ical.setProductId("-//xyz Corp//NONSGML PDA Calendar Version 1.0//EN");
{
VEvent event = new VEvent();
event.getProperties().clear();
event.setDateTimeStamp(utc("1996-07-04 12:00:00"));
event.setUid("[email protected]");
event.setOrganizer("[email protected]");
event.setDateStart(utc("1996-09-18 14:30:00"));
event.setDateEnd(utc("1996-09-20 22:00:00"));
event.setStatus(Status.confirmed());
event.addCategories("CONFERENCE");
event.setSummary("Networld+Interop Conference");
event.setDescription("Networld+Interop Conferenceand Exhibit\nAtlanta World Congress Center\nAtlanta, Georgia");
ical.addEvent(event);
}
assertValidate(ical).versions(V2_0_DEPRECATED, V2_0).run();
assertExample(ical, "rfc5545-example1.ics", V2_0);
}
示例3: write_example1
import biweekly.component.VEvent; //导入方法依赖的package包/类
@Test
public void write_example1() throws Throwable {
ICalendar ical = new ICalendar();
ical.getProperties().clear();
ical.setCalendarScale(CalendarScale.gregorian());
ical.setProductId("-//Example Inc.//Example Calendar//EN");
{
VEvent event = new VEvent();
event.getProperties().clear();
event.setDateTimeStamp(utc("2008-02-05 19:12:24"));
event.setDateStart(new DateStart(date("2008-10-06"), false));
event.setSummary("Planning meeting");
event.setUid("4088E990AD89CB3DBB484909");
ical.addEvent(event);
}
assertValidate(ical).versions(V2_0).run();
assertExample(ical, "rfc6321-example1.xml");
}
示例4: write_example1
import biweekly.component.VEvent; //导入方法依赖的package包/类
@Test
public void write_example1() throws Throwable {
ical.setCalendarScale(CalendarScale.gregorian());
ical.setProductId("-//Example Inc.//Example Calendar//EN");
{
VEvent event = new VEvent();
event.getProperties().clear();
event.setDateTimeStamp(utc("2008-02-05 19:12:24"));
event.setDateStart(new DateStart(date("2008-10-06"), false));
event.setSummary("Planning meeting");
event.setUid("4088E990AD89CB3DBB484909");
ical.addEvent(event);
}
assertValidate(ical).versions(V2_0).run();
assertExample(ical, "rfc6321-example1.xml");
}
示例5: example3
import biweekly.component.VEvent; //导入方法依赖的package包/类
@Test
public void example3() throws Throwable {
ICalendar ical = new ICalendar();
ical.getProperties().clear();
ical.setMethod("xyz");
ical.setProductId("-//ABC Corporation//NONSGML My Product//EN");
{
VEvent event = new VEvent();
event.getProperties().clear();
event.setDateTimeStamp(utc("1997-03-24 12:00:00"));
event.setSequence(0);
event.setUid("[email protected]");
event.setOrganizer("[email protected]");
Attendee attendee = new Attendee(null, "[email protected]");
attendee.setRsvp(true);
event.addAttendee(attendee);
event.setDateStart(utc("1997-03-24 12:30:00"));
event.setDateEnd(utc("1997-03-24 21:00:00"));
event.addCategories("MEETING", "PROJECT");
event.setClassification(Classification.public_());
event.setSummary("Calendaring Interoperability Planning Meeting");
event.setDescription("Discuss how we can test c&s interoperability\nusing iCalendar and other IETF standards.");
event.setLocation("LDB Lobby");
Attachment attach = new Attachment("application/postscript", "ftp://example.com/pub/conf/bkgrnd.ps");
event.addAttachment(attach);
ical.addEvent(event);
}
assertValidate(ical).versions(V2_0_DEPRECATED, V2_0).run();
assertExample(ical, "rfc5545-example3.ics", V2_0);
}
示例6: example2
import biweekly.component.VEvent; //导入方法依赖的package包/类
@Test
public void example2() throws Throwable {
TimeZone eastern = TimeZone.getTimeZone("America/New_York");
ICalendar ical = new ICalendar();
ical.getProperties().clear();
ical.setProductId("-//RDU Software//NONSGML HandCal//EN");
{
VEvent event = new VEvent();
event.setDateTimeStamp(utc("1998-03-09 23:10:00"));
event.setUid("guid-1.example.com");
event.setOrganizer("[email protected]");
Attendee attendee = new Attendee(null, "[email protected]");
attendee.setRsvp(true);
attendee.setParticipationLevel(ParticipationLevel.REQUIRED);
attendee.setCalendarUserType(CalendarUserType.GROUP);
event.addAttendee(attendee);
event.setDescription("Project XYZ Review Meeting");
event.addCategories("MEETING");
event.setClassification(Classification.public_());
event.setCreated(utc("1998-03-09 13:00:00"));
event.setSummary("XYZ Project Review");
event.setDateStart(date("1998-03-12 08:30:00", eastern));
event.setDateEnd(date("1998-03-12 09:30:00", eastern));
event.setLocation("1CP Conference Room 4350");
ical.addEvent(event);
}
assertValidate(ical).versions(V2_0_DEPRECATED, V2_0).run();
TimezoneInfo tzinfo = ical.getTimezoneInfo();
VTimezone usEasternTz;
{
usEasternTz = new VTimezone("America/New_York");
{
StandardTime standard = new StandardTime();
standard.setDateStart(new DateTimeComponents(1998, 10, 25, 2, 0, 0, false));
standard.setTimezoneOffsetFrom(new UtcOffset(false, 4, 0));
standard.setTimezoneOffsetTo(new UtcOffset(false, 5, 0));
standard.addTimezoneName("EST");
usEasternTz.addStandardTime(standard);
}
{
DaylightSavingsTime daylight = new DaylightSavingsTime();
daylight.setDateStart(new DateTimeComponents(1999, 4, 4, 2, 0, 0, false));
daylight.setTimezoneOffsetFrom(new UtcOffset(false, 5, 0));
daylight.setTimezoneOffsetTo(new UtcOffset(false, 4, 0));
daylight.addTimezoneName("EDT");
usEasternTz.addDaylightSavingsTime(daylight);
}
}
tzinfo.setDefaultTimezone(new TimezoneAssignment(eastern, usEasternTz));
assertExample(ical, "rfc5545-example2.ics", V2_0);
}