⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 libcalendar.tex

📁 python s60 1.4.5版本的源代码
💻 TEX
📖 第 1 页 / 共 2 页
字号:
\begin{methoddesc}[Entry]{set_time}{start\optional{, end}}

Sets the start and end datetime values of the entry (floats). If only one 
parameter is given, the other will have the same value. 

In case of events, anniversaries, and todo entries the datetime values are 
truncated to corresponding date values.

\class{TodoEntries} can be made undated with 
\code{TodoEntry.set_time(None)}. Making the todo entry undated means 
removing the start and end date and all the repeat rules.

\end{methoddesc}

\begin{memberdesc}[Entry]{start_time}

The start datetime value (float) of the entry or \code{None} if 
the start datetime of the entry is not set.

\end{memberdesc}

\begin{memberdesc}[Entry]{end_time}

The end datetime value (float) of the entry or \code{None} if the 
end datetime of the entry is not set.

\end{memberdesc}

\begin{memberdesc}[Entry]{id}

The unique ID of the entry.

\end{memberdesc}

\begin{memberdesc}[Entry]{last_modified}

The datetime value (float) of the entry's last modification in 
universal time.

\end{memberdesc}

\begin{memberdesc}[Entry]{alarm}

The alarm datetime value (float) for the entry. \code{None} if \code{alarm} is 
not set. Alternatively removes the alarm if the value is set to \code{None}. 

Alarms can be set to all \class{Entry} types. However, only alarms set to 
Appointments and Anniversaries will actually cause an alarm; this is similar 
to the Calendar application in your Nokia device, which allows you to set an 
alarm only for Meetings and Anniversaries. In addition, alarms set to any 
entries residing in a database other than the default database do not cause 
actual alarms either.

\end{memberdesc}

\begin{memberdesc}[Entry]{priority}

The priority of the entry, which can be an integer ranging from 0 to 255. Native 
Phonebook and Calendar applications in Nokia devices use value 1 for high 
priority, 2 for normal priority, and 3 for low priority. 

\end{memberdesc}

\begin{memberdesc}[Entry]{crossed_out}

The crossed out value of an entry. A value that is interpreted as false means 
that the entry is not crossed out, whereas a value that is interpreted as true 
means that the entry is crossed out. Note that \class{TodoEntries} must also 
have a cross-out time while the other entry types cannot have one. If 
\class{TodoEntry} is crossed out using this method, the moment of crossing out 
is set to the cross-out time of the \class{TodoEntry}. See also Section 
\ref{subsubsec:todoentry}, TodoEntry, \code{cross_out_time}.

\end{memberdesc}

\begin{memberdesc}[Entry]{replication}

Sets or returns the entry's replication status, which can be one of the 
following: \code{'open'}, \code{'private',} or \code{'restricted'}.

\end{memberdesc}

\begin{methoddesc}[Entry]{as_vcalendar}{}

Returns this entry as a vCalendar string.

\end{methoddesc}

\end{classdesc*}

\subsubsection{AppointmentEntry Objects}
\label{subsubsec:appointmententry}

\begin{classdesc*}{AppointmentEntry}
\end{classdesc*}

\class{AppointmentEntry} class contains no additional methods compared to 
the \class{Entry} class from which it is derived.

\subsubsection{EventEntry}
\label{subsubsec:evententry}

\begin{classdesc*}{EventEntry}
\end{classdesc*}

\class{EventEntry} class contains no additional methods compared to the 
\class{Entry} class from which it is derived.

\subsubsection{AnniversaryEntry}
\label{subsubsec:anniversaryentry}

\begin{classdesc*}{AnniversaryEntry}
\end{classdesc*}

\class{AnniversaryEntry} class contains no additional methods compared to 
the \class{Entry} class from which it is derived.

\subsubsection{TodoEntry}
\label{subsubsec:todoentry}

\class{TodoEntry}objects represent todo entry types. They have additional 
properties compared to the \class{Entry} class from which they are derived.

\begin{classdesc*}{TodoEntry}
\class{TodoEntry}objects have the following additional properties:

\begin{memberdesc}[TodoEntry]{cross_out_time}

The cross-out date value of the entry. The value can be \code{None} meaning that 
the entry is not crossed out, or the cross-out date (float). The set value must 
be date (float). Setting a cross-out time also crosses out the entry. See also 
Section \ref{subsec:entry}, Entry Object, \code{crossed_out}.

\end{memberdesc}

\begin{memberdesc}[TodoEntry]{todo_list}

The ID of the todo list to which this entry belongs.

\end{memberdesc}

\end{classdesc*}

\subsubsection{TodoListDict}
\label{subsubsec:todolistdict}

\class{TodoListDict} objects are dictionary-like objects that enable 
accessing todo lists. 

\begin{classdesc*}{TodoListDict}
\class{TodoListDict} objects have the following property:

\begin{memberdesc}[TodoListDict]{default_list}

The ID of the default todo list.

\end{memberdesc}

\end{classdesc*}

\subsubsection{TodoList}
\label{subsubsec:todolist}

\class{TodoList} objects are dictionary-like objects that enable 
accessesing todo lists. 

\begin{classdesc*}{TodoList}
\code{TodoList} objects have the following properties:

\begin{memberdesc}[TodoList]{name}

The name of the todo list as a Unicode string.

\end{memberdesc}

\begin{memberdesc}[TodoList]{id}

Returns the ID of the todo list as an integer.

\end{memberdesc}

\end{classdesc*}

\subsection{Repeat Rules}
\label{subsec:repeat}

Repeat rules specify an entry's repeat status, that is, the recurrence of 
the entry. There are six repeat types: 

\begin{itemize}
\item \code{daily}: repeated daily
\item \code{weekly}: repeat on the specified days of the week, such as Monday and Wednesday, etc.
\item \code{monthly_by_dates}: repeat monthly on the specified dates, such as the 15th and 17th day of the month
\item \code{monthly_by_days}: repeat monthly on the specified days, such as the fourth Wednesday of the month, or the last Monday of the month
\item \code{yearly_by_date}: repeat yearly on the specified date, such as December 24
\item \code{yearly_by_day}: repeat yearly on the specified day, such as every third Tuesday of May
\end{itemize}

There are exceptions to repeat rules. For example, you can specify the 
datetime value (float) in such a way that the entry is not repeated on a 
specific day even if the repeat rule would specify otherwise.

You must set the start and end dates (floats) of the repeat. The end date 
can also be set to \code{None} to indicate that the repeating continues 
forever. You can set \code{interval} defining how often the repeat occurs, 
for example in a daily repeat: \code{1} means every day, \code{2} means 
every second day, etc. You can also set the \code{days} specifier which 
lets you explicitly specify the repeat days; for example in a weekly repeat 
you can set \code{"days":[0,2]} which sets the repeat to occur on Mondays 
and Wednesdays. If you do not set the \code{days} specifier, the repeat 
days are calculated automatically based on the start date.

You can modify repeat data by calling \code{rep_data = 
entry.get_repeat()}, then making changes to \code{rep_data} 
dictionary, and then calling \code{entry.set_repeat(rep_data)}.

Repeating can be cancelled by calling \code{entry.set_repeat} with a 
parameter that is interpreted to be false, such as 
\code{entry.set_repeat(None)}.

Repeat definition examples:

\begin{verbatim}

repeat = {"type":"daily", #repeat type
          "exceptions":[exception_day, exception_day+2*24*60*60],  
          #no appointment on those days
          "start":appt_start_date, #start of the repeat
          "end":appt_start_date+30*24*60*60, #end of the repeat
          "interval":1} #interval (1=every day, 2=every second day etc.)

repeat = {"type":"weekly", #repeat type
          "days":[0,1], #which days in a week (Monday, Tuesday)
          "exceptions":[exception_day], #no appointment on that day
          "start":appt_start_date, #start of the repeat
          "end":appt_start_date+30*24*60*60, #end of the repeat
          "interval":1}  
          #interval (1=every week, 2=every second week etc.) 

repeat = {"type":"monthly_by_days", #repeat type
          # appointments on second Tuesday and last Monday of the month
          "days":[{"week":1, "day":1},{"week":4, "day":0}],
          "exceptions":[exception_day], #no appointment on that day 
          "start":appt_start_date, #start of the repeat
          "end":appt_start_date+30*24*60*60, #end of the repeat
          "interval":1}  
          #interval (1=every month, 2=every second month etc.)

repeat = {"type":"monthly_by_dates", #repeat type
          "days":[0,15],  
          # appointments on the 1st and 16th day of the month.
          "exceptions":[exception_day], #no appointment on that day
          "start":appt_start_date, #start of the repeat
          "end":appt_start_date+30*24*60*60, #end of the repeat
          "interval":1}  
          #interval (1=every month, 2=every second month etc.)

repeat = {"type":"yearly_by_date", #repeat type
          "exceptions":[exception_day], #no appointment on that day 
          "start":appt_start_date, #start of the repeat
          "end":appt_start_date+3*365*24*60*60, #end of the repeat
          "interval":1}  
          #interval (1=every year, 2=every second year etc.)

repeat = {"type":"yearly_by_day", #repeat type
          # appointments on the second Tuesday of February
          "days":{"day":1, "week":1, "month":1},
          "exceptions":[exception_day], #no appointment on that day 
          "start":appt_start_date, #start of the repeat
          "end":appt_start_date+3*365*24*60*60, #end of the repeat
          "interval":1}  
          #interval (1=every year, 2=every second year etc.)

\end{verbatim}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -