จัดการนัดหมาย: สร้าง, โหลด, แปลง ICS และทำงานกับการเกิดซ้ำ
การเชิญประชุม, การส่งออกปฏิทินและข้อมูลการกำหนดการทั้งหมดเดินทางเป็นไฟล์ iCalendar (ICS) ใน Aspose.Email for C++ VEVENT เดียวแทนอธิบายด้วย Appointment คลาสของ Aspose::Email::Calendar namespace; กฎการเกิดซ้ำอยู่ใน Aspose::Email::Calendar::Recurrences. บทความนี้อยู่ในด้านมาตรฐานของการจัดตารางเวลา. เฉพาะ Outlook MapiCalendar รายการครอบคลุมใน ทำงานกับรายการปฏิทิน Outlook, และรายการปฏิทินที่เก็บใน PST ใน การทำงานกับรายการปฏิทินในไฟล์ PST.
ตัวอย่างด้านล่างใช้ส่วนหัวและเนมสเปซต่อไปนี้:
#include <MailMessage.h>
#include <MailAddress.h>
#include <MailAddressCollection.h>
#include <AlternateView.h>
#include <AlternateViewCollection.h>
#include <ParticipationStatus.h>
#include <SaveOptions.h>
#include <EmlSaveOptions.h>
#include <Mime/ContentType.h>
#include <Mapi/MapiMessage.h>
#include <Calendar/Appointment.h>
#include <Calendar/AppointmentIcsSaveOptions.h>
#include <Calendar/AppointmentMsgSaveOptions.h>
#include <Calendar/AppointmentMethodType.h>
#include <Calendar/AppointmentAction.h>
#include <Calendar/CalendarReader.h>
#include <Calendar/CalendarWriter.h>
#include <Calendar/Recurrences/CalendarRecurrence.h>
#include <Calendar/Recurrences/RecurrenceRule.h>
#include <Calendar/Recurrences/RecurrenceRuleCollection.h>
#include <Calendar/Recurrences/ByNumberCollection.h>
#include <Calendar/Recurrences/DateCollection.h>
#include <Calendar/Recurrences/WeeklyRecurrencePattern.h>
#include <Calendar/Recurrences/CalendarDay.h>
#include <Calendar/Recurrences/Frequency.h>
#include <system/guid.h>
#include <system/collections/list.h>
#include <system/convert.h>
using namespace System;
using namespace Aspose::Email;
using namespace Aspose::Email::Mapi;
using namespace Aspose::Email::Mime;
using namespace Aspose::Email::Calendar;
using namespace Aspose::Email::Calendar::Recurrences;
สร้างการนัดหมายและบันทึกเป็น ICS หรือ MSG
ตัวสร้างที่มีอากิวเมนต์เจ็ด Appointment ตัวสร้างรับตำแหน่ง, สรุป, คำอธิบาย, เวลาเริ่มและสิ้นสุด, ผู้จัดเป็น MailAddress และผู้เข้าร่วมเป็น MailAddressCollection. บันทึก เขียนผลลัพธ์ในรูปแบบที่เลือกโดยอ็อบเจ็กต์ options: AppointmentIcsSaveOptions สำหรับไฟล์ ICS ที่แอปปฏิทินใด ๆ สามารถนำเข้า, หรือ AppointmentMsgSaveOptions สำหรับรายการ Outlook MSG
SharedPtr<MailAddressCollection> attendees = MakeObject<MailAddressCollection>();
attendees->Add(MakeObject<MailAddress>(u"attendee@domain.com"));
SharedPtr<Appointment> appointment = MakeObject<Appointment>(
u"Meeting Room 3 at Office Headquarters", // location
u"Monthly Meeting", // summary
u"Please confirm your availability.", // description
DateTime(2025, 2, 8, 13, 0, 0), // start date
DateTime(2025, 2, 8, 14, 0, 0), // end date
MakeObject<MailAddress>(u"organizer@domain.com"), // organizer
attendees); // attendees
// iCalendar (ICS) output
appointment->Save(u"MonthlyMeeting.ics", MakeObject<AppointmentIcsSaveOptions>());
// Outlook MSG output
appointment->Save(u"MonthlyMeeting.msg", MakeObject<AppointmentMsgSaveOptions>());
เพิ่มคำอธิบาย HTML
iCalendar อนุญาตการเรนเดอร์คำอธิบายทางเลือกที่อุดมด้วย HTML ผ่าน X-ALT-DESC คุณสมบัติ. กำหนดมาร์คอัปให้กับ HtmlDescription; ไคลเอนต์ที่เข้าใจคุณสมบัตินี้จะแสดง HTML, ส่วนอื่นๆ จะกลับไปใช้ข้อความธรรมดา DESCRIPTION. ตัวสร้างที่มีอากิวเมนต์ห้า ตัวที่ใช้ที่นี่ละเว้นสรุปและคำอธิบาย
SharedPtr<MailAddressCollection> attendees = MakeObject<MailAddressCollection>();
attendees->Add(MakeObject<MailAddress>(u"AinaMartensson@to.com", String(u"Aina Martensson")));
SharedPtr<Appointment> appointment = MakeObject<Appointment>(
u"Bygget 83",
DateTime::get_UtcNow(), // start date
DateTime::get_UtcNow().AddHours(1), // end date
MakeObject<MailAddress>(u"TintinStrom@from.com", String(u"Tintin Strom")), // organizer
attendees);
// alternative representation of the description, written as X-ALT-DESC
appointment->set_HtmlDescription(
u"<html>"
u"<style type=\"text/css\">.text { font-family:'Comic Sans MS'; font-size:16px; }</style>"
u"<body><p class=\"text\">Hi, I'm happy to invite you to our party.</p></body>"
u"</html>");
appointment->Save(u"PartyInvitation.ics", MakeObject<AppointmentIcsSaveOptions>());
สร้างร่างคำขอประชุม
คำขอประชุมคือการนัดหมายที่ฝังอยู่ในข้อความเมลเป็น text/calendar มุมมองสำรอง เพื่อเก็บเป็นร่างที่สามารถทำต่อในภายหลัง – เช่นใน Outlook – ให้ตั้งค่า MethodType เป็น AppointmentMethodType::Publish, แนบมุมมองที่สร้างโดย RequestApointment ไปยัง MailMessage, แปลงข้อความเป็น MAPI และบันทึกเป็น MSG.
String sender = u"test@gmail.com";
String recipient = u"test@email.com";
SharedPtr<MailMessage> message = MakeObject<MailMessage>(sender, recipient, String::Empty, String::Empty);
SharedPtr<MailAddressCollection> attendees = MakeObject<MailAddressCollection>();
attendees->Add(MakeObject<MailAddress>(recipient));
SharedPtr<Appointment> appointment = MakeObject<Appointment>(String::Empty, DateTime::get_Now(), DateTime::get_Now(),
MakeObject<MailAddress>(sender), attendees);
// PUBLISH marks the request as a draft that can be completed later
appointment->set_MethodType(AppointmentMethodType::Publish);
message->AddAlternateView(appointment->RequestApointment());
SharedPtr<MapiMessage> msg = MapiMessage::FromMailMessage(message);
msg->Save(u"DraftAppointment.msg");
สร้างร่างจากข้อความ iCalendar
หากคำเชิญมีอยู่แล้วเป็นข้อความ iCalendar – ได้รับจากระบบอื่นหรือสร้างจากเทมเพลต – สามารถห่อเป็น AlternateView กับ CreateAlternateViewFromString และ text/calendar ContentType, จากนั้นจัดเก็บเช่นเดียวกัน
String ical =
u"BEGIN:VCALENDAR\r\n"
u"METHOD:PUBLISH\r\n"
u"PRODID:-//Aspose Ltd//iCalender Builder (v3.0)//EN\r\n"
u"VERSION:2.0\r\n"
u"BEGIN:VEVENT\r\n"
u"ATTENDEE;CN=test@gmail.com:mailto:test@gmail.com\r\n"
u"DTSTART:20130220T171439\r\n"
u"DTEND:20130220T174439\r\n"
u"DTSTAMP:20130220T161439Z\r\n"
u"END:VEVENT\r\n"
u"END:VCALENDAR";
SharedPtr<MailMessage> message = MakeObject<MailMessage>(u"test@gmail.com", u"test@email.com", String::Empty, String::Empty);
// the iCalendar text becomes a text/calendar alternate view of the message
SharedPtr<AlternateView> view = AlternateView::CreateAlternateViewFromString(ical, MakeObject<ContentType>(u"text/calendar"));
message->get_AlternateViews()->Add(view);
SharedPtr<MapiMessage> msg = MapiMessage::FromMailMessage(message);
msg->Save(u"DraftFromText.msg");
ปรับแต่งการนัดหมาย
ตั้งค่าสถานะการเข้าร่วมของผู้เข้าร่วม
เมื่อการนัดหมายเขียนกลับเป็นการตอบ, แต่ละผู้เข้าร่วมอาจมี PARTSTAT ค่า. กำหนด ParticipationStatus ไปยัง MailAddress อ็อบเจ็กต์ก่อนเพิ่มเข้าไปในคอลเลกชันผู้เข้าร่วม; ค่าจะปรากฏเป็นพารามิเตอร์ของ ATTENDEE บรรทัด
DateTime startDate(2025, 12, 10, 10, 12, 11);
DateTime endDate(2025, 12, 13, 13, 11, 12);
SharedPtr<MailAddress> organizer = MakeObject<MailAddress>(u"aaa@amail.com", String(u"Organizer"));
SharedPtr<MailAddress> attendee1 = MakeObject<MailAddress>(u"bbb@bmail.com", String(u"First attendee"));
SharedPtr<MailAddress> attendee2 = MakeObject<MailAddress>(u"ccc@cmail.com", String(u"Second attendee"));
// the status ends up in the PARTSTAT parameter of each ATTENDEE line
attendee1->set_ParticipationStatus(ParticipationStatus::Accepted);
attendee2->set_ParticipationStatus(ParticipationStatus::Declined);
SharedPtr<MailAddressCollection> attendees = MakeObject<MailAddressCollection>();
attendees->Add(attendee1);
attendees->Add(attendee2);
SharedPtr<Appointment> appointment = MakeObject<Appointment>(u"Room 12", startDate, endDate, organizer, attendees);
appointment->Save(u"WithParticipationStatus.ics", MakeObject<AppointmentIcsSaveOptions>());
ตั้งค่า Product Identifier
ไฟล์ iCalendar ทุกไฟล์จะใส่ซอฟต์แวร์ที่สร้างลงใน PRODID คุณสมบัติ. เพื่อตั้งค่า identifier ของคุณเอง, ให้กำหนด ProductId บนตัวเลือกการบันทึก – สถิติก ค่าเริ่มต้น อินสแตนซ์เป็นจุดเริ่มต้นที่สะดวก
SharedPtr<MailAddressCollection> attendees = MakeObject<MailAddressCollection>();
attendees->Add(MakeObject<MailAddress>(u"second@test.com"));
SharedPtr<Appointment> appointment = MakeObject<Appointment>(u"location", u"test appointment", u"Test Description",
DateTime::get_Today(), DateTime::get_Today().AddDays(1), MakeObject<MailAddress>(u"first@test.com"), attendees);
// the value is written to the PRODID property of the calendar
SharedPtr<AppointmentIcsSaveOptions> saveOptions = AppointmentIcsSaveOptions::get_Default();
saveOptions->set_ProductId(u"Test Corporation");
appointment->Save(u"CustomProdId.ics", saveOptions);
โหลดการนัดหมาย
สตาติก Load วิธีนี้แยกวิเคราะห์ไฟล์ ICS (มีส่วนโอเวอร์โหลดสตรีมเช่นกัน) และคืนค่า Appointment ที่คุณสมบัติเชื่อมโยงกับ VEVENT
SharedPtr<Appointment> loaded = Appointment::Load(u"MonthlyMeeting.ics");
Console::WriteLine(u"Summary: " + loaded->get_Summary());
Console::WriteLine(u"Location: " + loaded->get_Location());
Console::WriteLine(u"Description: " + loaded->get_Description());
Console::WriteLine(u"Start date: " + loaded->get_StartDate().ToString());
Console::WriteLine(u"End date: " + loaded->get_EndDate().ToString());
Console::WriteLine(u"Organizer: " + loaded->get_Organizer()->ToString());
Console::WriteLine(u"Attendees: " + loaded->get_Attendees()->ToString());
แปลง ICS เป็น EML หรือ MSG
ToMailMessage ห่อการนัดหมายเป็นข้อความ MIME พร้อมมุมมองสำรองปฏิทิน, และ ToMapiMessage สร้างรายการ Outlook. ผลลัพธ์ใดก็สามารถบันทึกด้วยวิธีปกติ
SharedPtr<Appointment> appointment = Appointment::Load(u"MonthlyMeeting.ics");
// MIME message carrying the invitation
SharedPtr<MailMessage> eml = appointment->ToMailMessage();
eml->Save(u"MonthlyMeeting.eml", SaveOptions::get_DefaultEml());
// Outlook MAPI message
SharedPtr<MapiMessage> msg = appointment->ToMapiMessage();
msg->Save(u"MonthlyMeetingFromIcs.msg");
ตรวจสอบเวอร์ชันของ iCalendar
Version คืนค่า VERSION คุณสมบัติของไฟล์ที่โหลด - "2.0" สำหรับ iCalendar (RFC 5545), "1.0" สำหรับรูปแบบ vCalendar เก่า – เพื่อให้แอปพลิเคชันสามารถแยกตามภาษาที่ได้รับ
SharedPtr<Appointment> appointment = Appointment::Load(u"MonthlyMeeting.ics");
// Version holds the ICS/VCS version string, e.g. "2.0" for iCalendar
if (appointment->get_Version() == u"2.0")
{
Console::WriteLine(u"iCalendar 2.0 file");
}
อ่านหลายเหตุการณ์จากไฟล์ ICS
การส่งออกปฏิทินมักบรรจุเหตุการณ์หลายรายการในไฟล์เดียว CalendarReader วนลูปผ่านพวกมัน: NextEvent ก้าวไปยัง VEVENT ถัดไปและคืนค่า false ที่ท้าย, ขณะเดียวกัน ปัจจุบัน เผยให้เห็นเหตุการณ์เป็น Appointment.
auto appointments = MakeObject<Collections::Generic::List<SharedPtr<Appointment>>>();
SharedPtr<CalendarReader> reader = MakeObject<CalendarReader>(u"US-Holidays.ics");
// each call moves to the next VEVENT; Current exposes it as an Appointment
while (reader->NextEvent())
{
appointments->Add(reader->get_Current());
}
Console::WriteLine(u"Events loaded: " + Convert::ToString(appointments->get_Count()));
for (SharedPtr<Appointment> appointment : appointments)
{
Console::WriteLine(appointment->get_StartDate().ToString(u"yyyy-MM-dd") + u" " + appointment->get_Summary());
}
เขียนหลายเหตุการณ์ลงไฟล์ ICS
CalendarWriter เป็นส่วนตรงข้ามสำหรับการเอาต์พุต: ทุก เขียน การเรียกต่อเติม VEVENT หนึ่งรายการไปยัง VCALENDAR เดียวกัน. The การกระทำ ของตัวเลือกการบันทึกกำหนด METHOD เขียนลงไฟล์ ปิดการเขียนเพื่อปิดปฏิทินอย่างถูกต้อง
SharedPtr<AppointmentIcsSaveOptions> saveOptions = MakeObject<AppointmentIcsSaveOptions>();
saveOptions->set_Action(AppointmentAction::Create);
SharedPtr<CalendarWriter> writer = MakeObject<CalendarWriter>(u"MultipleEvents.ics", saveOptions);
for (int32_t i = 0; i < 10; i++)
{
SharedPtr<MailAddressCollection> attendees = MakeObject<MailAddressCollection>();
attendees->Add(MakeObject<MailAddress>(u"receiver@domain.com"));
SharedPtr<Appointment> appointment = MakeObject<Appointment>(String::Empty,
DateTime::get_Now().AddDays(i), DateTime::get_Now().AddDays(i).AddHours(1),
MakeObject<MailAddress>(u"sender@domain.com"), attendees);
appointment->set_Description(u"Test body " + Convert::ToString(i));
appointment->set_Summary(u"Test summary:" + Convert::ToString(i));
// every call appends one VEVENT to the same VCALENDAR
writer->Write(appointment);
}
writer->Dispose();
สร้างการนัดหมายที่เกิดซ้ำ
ชุดของการประชุมคือการนัดหมายเดียวที่มีรูปแบบการเกิดซ้ำแนบกับ Recurrence คุณสมบัติ. คลาสรูปแบบ - DailyRecurrencePattern, WeeklyRecurrencePattern, MonthlyRecurrencePattern, YearlyRecurrencePattern - ถูกสร้างโดยจำนวนการเกิดหรือด้วยวันสิ้นสุด การกำหนด UniqueId เป็นแนวปฏิบัติที่ดี: ตัวระบุเดียวกันจำเป็นต้องใช้ต่อไปเพื่อออกการอัปเดตหรือการยกเลิกสำหรับชุด ตัวอย่างสร้างการประชุม 14 ครั้งที่จัดในวันจันทร์, อังคารและพฤหัสบดีของทุกสัปดาห์และบันทึกชุดเป็นไฟล์ ICS
SharedPtr<MailAddressCollection> attendees = MakeObject<MailAddressCollection>();
attendees->Add(MakeObject<MailAddress>(u"to@domain.com"));
DateTime startDate(2025, 12, 1, 17, 0, 0);
DateTime endDate(2025, 12, 1, 17, 30, 0);
SharedPtr<Appointment> appointment = MakeObject<Appointment>(u"same place", startDate, endDate,
MakeObject<MailAddress>(u"from@domain.com"), attendees);
// keep the identifier so the series can be updated or cancelled later
appointment->set_UniqueId(Guid::NewGuid().ToString());
appointment->set_Description(u"Weekly sync");
// 14 occurrences on Monday, Tuesday and Thursday of every week
SharedPtr<WeeklyRecurrencePattern> pattern = MakeObject<WeeklyRecurrencePattern>(14);
pattern->set_StartDays(MakeArray<CalendarDay>({ CalendarDay::Monday, CalendarDay::Tuesday, CalendarDay::Thursday }));
pattern->set_Interval(1);
appointment->set_Recurrence(pattern);
appointment->Save(u"RecurringMeeting.ics", MakeObject<AppointmentIcsSaveOptions>());
ไฟล์ที่ได้มีเนื้อหา RRULE:FREQ=WEEKLY;WKST=MO;INTERVAL=1;COUNT=14;BYDAY=MO,TU,TH. มุมมองสำรองที่คืนค่ามาโดย UpdateAppointment และ CancelAppointment ถูกสร้างแบบเดียวกับ RequestApointment และสามารถแนบไปกับข้อความที่ส่งด้วยไคลเอนต์เมลหนึ่งตัว
ทำงานกับรูปแบบการเกิดซ้ำของ iCalendar
ในคำศัพท์ iCalendar รูปแบบการเกิดซ้ำเป็นคำอธิบายแบบกะทัดรัดของกำหนดการซึ่งสามารถคำนวณวันที่แต่ละวัน – เหตุการณ์ – ได้ RFC 5545 แสดงด้วยคุณสมบัติไม่กี่รายการ: DTSTART (การเกิดขึ้นครั้งแรกและจุดยึดของรูปแบบ), RRULE (กฎที่ทำซ้ำ), RDATE (วันที่เพิ่มเพื่อรวม), EXRULE (กฎที่อธิบายวันที่ยกเว้น) และ EXDATE (วันที่แยกเป็นรายการเพื่อยกเว้น). มีเพียง DTSTART จำเป็นต้องมี
นี้ Aspose::Email::Calendar::Recurrences namespace โมเดลนี้โดยตรง:
- CalendarRecurrence คือรูปแบบทั้งหมด. มันเก็บวันเริ่มต้นและ RRules, ExRules, RDates และ ExDates คอลเลกชัน, และสามารถสร้างจากข้อความ iCalendar หรือประกอบในโค้ด
- RecurrenceRule คือหนึ่ง
RRULEหรือEXRULE. คุณสมบัติของมัน (Frequency, Interval, Count, Until, ByDay, ByMonthDay, ByMonth, BySetPos และอื่น ๆ) ตรงกับส่วนของกฎตามมาตรฐานหนึ่งต่อหนึ่ง
แปลงรูปแบบและสร้างเหตุการณ์ที่เกิดขึ้น
นี้ CalendarRecurrence(String) คอนสตรัคเตอร์รับข้อความ iCalendar; GenerateOccurrences ขยายเป็น DateCollection. สิบการประชุมทีม, ทุกวันจันทร์เวลา 10:00:
// Ten team meetings, every Monday at 10am
SharedPtr<CalendarRecurrence> pattern = MakeObject<CalendarRecurrence>(
u"DTSTART:20040301T100000\nRRULE:FREQ=WEEKLY;COUNT=10;BYDAY=MO");
SharedPtr<DateCollection> dates = pattern->GenerateOccurrences();
for (DateTime date : dates)
{
Console::WriteLine(date.ToString());
}
สร้างรูปแบบในโค้ด
ผลลัพธ์เดียวกันสามารถทำได้โดยไม่มีข้อความ: ตั้งค่าวันเริ่มต้น, เพิ่มกฎไปยัง RRules และใส่คุณสมบัติของมัน. The GenerateOccurrences(int32_t) การ overload จำกัดจำนวนวันที่สร้าง, ซึ่งเป็นวิธีขอ "N ครั้งถัดไป" ของกฎที่ไม่มีขอบเขต
SharedPtr<CalendarRecurrence> recurrencePattern = MakeObject<CalendarRecurrence>();
recurrencePattern->set_StartDate(DateTime(1997, 9, 10, 9, 0, 0));
// build the RRULE part programmatically
SharedPtr<RecurrenceRule> rule = recurrencePattern->get_RRules()->Add();
rule->set_Frequency(Frequency::Monthly);
rule->set_Count(20);
rule->set_Interval(18);
rule->get_ByMonthDay()->Add(MakeArray<int32_t>({ 10, 11, 12, 13, 14, 15 }));
SharedPtr<DateCollection> expectedDates = recurrencePattern->GenerateOccurrences(20);
Console::WriteLine(u"expectedDates.Count = " + Convert::ToString(expectedDates->get_Count()));
for (DateTime date : expectedDates)
{
Console::WriteLine(u"DateTime = " + date.ToString());
}
อธิบายกฎด้วยคำธรรมดา
FriendlyText แปลงกฎเป็นประโยคที่เหมาะกับส่วนติดต่อผู้ใช้. กฎด้านล่างให้ผลลัพธ์ "เกิดซ้ำทุกเดือนในวันที่ 1 และ 1 จากวันสุดท้ายของเดือน สูงสุด 2 ครั้ง"
SharedPtr<RecurrenceRule> rule = MakeObject<RecurrenceRule>();
rule->set_Frequency(Frequency::Monthly);
rule->set_Count(2);
rule->get_ByMonthDay()->Add(1);
rule->get_ByMonthDay()->Add(-1);
Console::WriteLine(rule->get_FriendlyText());
สูตรกฎ
| ตาราง | RRULE | | — | — | | วันสุดท้ายของทุกเดือน (-2 จะเป็นวันก่อนหน้า; 31 ข้ามเดือนที่สั้นกว่า) | FREQ=MONTHLY;BYMONTHDAY=-1 | | วันทำการสุดท้ายของทุกเดือน (BYSETPOS เลือกวันทำการสุดท้ายจากวันทำการที่ระบุ) | FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1 | | วันจันทร์สุดท้ายของปี | FREQ=YEARLY;BYDAY=-1MO | | ศุกร์ของสัปดาห์ ISO 8601 แรกของปี | FREQ=YEARLY;BYWEEKNO=1;BYDAY=FR | | วันศุกร์แรกของปี | FREQ=YEARLY;BYDAY=1FR |
ค่าจัดรูปวันและเวลาในรูปแบบ
- A
DATEค่ามีรูปแบบyyyyMMdd(19970714). - ท้องถิ่น
DATE-TIME(DTSTART:19980118T230000) คือ "floating": หมายถึงเวลาเดียวกันบนนาฬิกากำแพงในโซนเวลาใดก็ได้ที่กำลังใช้งาน - UTC
DATE-TIMEมีสัญลักษณ์ต่อท้ายZ(DTSTART:19980119T070000Z). Aspose.Email ไม่สนใจZและถือค่าดังกล่าวเป็นเวลาในท้องถิ่น; ในUNTIL, ที่ RFC 5545 กำหนดให้เป็น UTC, รูปแบบใดก็ได้ที่รับได้ - A
DATE-TIMEqualified withTZID(DTSTART;TZID=US-Eastern:19980119T020000) ยังถือเป็นเวลาในท้องถิ่น; theTZIDพารามิเตอร์นี้ขณะนี้ถูกละเลย BYWEEKNOตามมาตรฐาน ISO 8601: สัปดาห์ที่ 1 คือสัปดาห์แรกที่มีอย่างน้อยสี่วันในปีใหม่ ใช้ได้เฉพาะกับFREQ=YEARLY, และค่าของมันอยู่ระหว่าง 1 ถึง 53 และจาก -1 ถึง -53
ดูเพิ่มเติม
- ทำงานกับรายการปฏิทิน Outlook -
MapiCalendarรายการในรูปแบบ MSG - การทำงานกับรายการปฏิทินในไฟล์ PST - รายการปฏิทินที่เก็บใน PST