xo::ical::VCALITEM method ical_body (public)

 <instance of xo::ical::VCALITEM[i]> ical_body

Defined in packages/xotcl-core/tcl/ical-procs.tcl

The method ical_body returns the ical-formatted content of the variables. All variables of VEVENTs and VTODOs are listed below, since the names are distinct, and no methods are used. So far there is no handling for the repetition fields (which might occur more than once). An option would be to handle these as lists. All date/timestamps are provided either by the ANSI date (from postgres) or by a date which can be processed via clock scan

Testcases:
No testcase defined.
Source code:
if {![info exists :dtstamp]}       {set :dtstamp ${:creation_date}}
if {![info exists :last_modified]} {set :last_modified ${:dtstamp}}

set tcl_stamp         [::xo::db::tcl_date ${:dtstamp} tz]
set tcl_creation_date [::xo::db::tcl_date ${:creation_date} tz]
set tcl_last_modified [::xo::db::tcl_date ${:last_modified} tz]

# status values:
#    VEVENT:   TENTATIVE, CONFIRMED, CANCELLED
#    VTODO:    NEEDS-ACTION, COMPLETED, IN-PROCESS, CANCELLED
#    VJOURNAL: DRAFT, FINAL, CANCELLED

append t   [:tag -conv tcl_time_to_utc -value $tcl_creation_date created]  [:tag -conv tcl_time_to_utc -value $tcl_last_modified last-modified]  [:tag -conv tcl_time_to_utc -value $tcl_stamp dtstamp]  [:start_end]  [:tag -conv tcl_time_to_utc completed]  [:tag -conv tcl_time_to_utc percent-complete]  [:tag transp]  [:tag uid]  [:tag url]  [:tag geo]  [:tag priority]  [:tag sequence]  [:tag CLASS]  [:tag -conv text_to_ical location]  [:tag status]  [:tag -conv text_to_ical description]  [:tag -conv text_to_ical summary]  [:tag -conv tcl_time_to_utc due]

if {[info exists :formatted_recurrences]} {
  append t ${:formatted_recurrences}
}
return $t
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: