視覚障害者がアクセスできるフロントエンド アプリケーションを開発しています。正常に作成、削除、および更新eventsします。event私の問題は、繰り返しのプロパティ、つまり毎日、毎月などを取得したいので、繰り返しeventが何であるかをユーザーに示して変更できるようにすることです。
私が考えることができる唯一の方法は、Recurrence文字列を解析することです。とはいえ、とても難しくて時間がかかると思います。私の問題に対する別の解決策を考えられる人はいますか?
視覚障害者がアクセスできるフロントエンド アプリケーションを開発しています。正常に作成、削除、および更新eventsします。event私の問題は、繰り返しのプロパティ、つまり毎日、毎月などを取得したいので、繰り返しeventが何であるかをユーザーに示して変更できるようにすることです。
私が考えることができる唯一の方法は、Recurrence文字列を解析することです。とはいえ、とても難しくて時間がかかると思います。私の問題に対する別の解決策を考えられる人はいますか?
質問を正しく理解している場合は、次のように表示する必要があります。
Xyz every day at 5:00 pm starting on 6/1/2011 until 6/6/2011
ただし、これにより、API で定期的なイベントにアクセスする方法に基づいて、逆方向に作業する必要があると思います。定期的なイベントのすべてのwhenプロパティがリストに格納されます (たとえば、上記の各日に対して 1 つのエントリ)。言い換えれば、これらの文字列を解析して関係を判断することが、実際に関係を判断する唯一の明白な方法のようです。これ
参照: http://code.google.com/apis/calendar/data/2.0/developers_guide_dotnet.html
編集:実際には、オンラインで文書化されていませんが、繰り返し文字列にもアクセスできるようです。のCalendarEventEntryクラスにgdata.calendar.dataはクラスの属性recurrenceがありますgdata.data.Recurrence。参考までに、ソース ファイルの関数定義で提供されているコメントを次に示します (私は Python バージョンを使用しています)。
class Recurrence(atom.core.XmlElement):
"""The gd:recurrence element.
Represents the dates and times when a recurring event takes place.
The string that defines the recurrence consists of a set of properties,
each of which is defined in the iCalendar standard (RFC 2445).
Specifically, the string usually begins with a DTSTART property that
indicates the starting time of the first instance of the event, and
often a DTEND property or a DURATION property to indicate when the
first instance ends. Next come RRULE, RDATE, EXRULE, and/or EXDATE
properties, which collectively define a recurring event and its
exceptions (but see below). (See section 4.8.5 of RFC 2445 for more
information about these recurrence component properties.) Last comes a
VTIMEZONE component, providing detailed timezone rules for any timezone
ID mentioned in the preceding properties.
Google services like Google Calendar don't generally generate EXRULE
and EXDATE properties to represent exceptions to recurring events;
instead, they generate <gd:recurrenceException> elements. However,
Google services may include EXRULE and/or EXDATE properties anyway;
for example, users can import events and exceptions into Calendar, and
if those imported events contain EXRULE or EXDATE properties, then
Calendar will provide those properties when it sends a <gd:recurrence>
element.
Note the the use of <gd:recurrenceException> means that you can't be
sure just from examining a <gd:recurrence> element whether there are
any exceptions to the recurrence description. To ensure that you find
all exceptions, look for <gd:recurrenceException> elements in the feed,
and use their <gd:originalEvent> elements to match them up with
<gd:recurrence> elements.
"""
...
編集 2 : 関連する質問ですが、答えはありません - Python solution to parse Google calendar's recurrencies .