Class Relations
- class: ::nx::Object
::nx::Object create ::xo::ical
Methods (to be applied on the object)
clock_to_iso (scripted)
clock format $seconds -format "%Y-%m-%dT%H:%M:%SZ" -gmt 1
clock_to_local_day (scripted)
clock format $seconds -format "%Y%m%d"
clock_to_oacstime (scripted)
clock format $seconds -format "%Y-%m-%d %H:%M"
clock_to_utc (scripted)
clock format $seconds -format "%Y%m%dT%H%M%SZ" -gmt 1
date_time_to_clock (scripted)
set year [string range $date 0 3]
set month [string range $date 4 5]
set day [string range $date 6 7]
set hour [string range $time 0 1]
set min [string range $time 2 3]
set sec [string range $time 4 5]
set TZ [expr {$utc ? "GMT" : ""}]
return [clock scan "$year-$month-$day $hour:$min $TZ"]
dates_valid_p (scripted)
expr {[clock scan $start_date] <= [clock scan $end_date]}
ical_to_text (scripted)
regsub -all {\\(n|N)} $text \n text
regsub -all {\\(\\|\;|\,)} $text {\1} text
return $text
reflow_content_line (scripted)
if {[string length $text] > 73} {
set lines ""
while {[string length $text] > 73} {
append lines [string range $text 0 73] \r\n " "
set text [string range $text 74 end]
}
append lines $text
set text $lines
}
return $text
tcl_time_to_local_day (scripted)
return "VALUE=DATE:[:clock_to_local_day [clock scan $time]]"
tcl_time_to_utc (scripted)
clock format [clock scan $time] -format "%Y%m%dT%H%M%SZ" -gmt 1
text_to_ical (scripted)
if {$remove_tags} {
regsub -all {<[^>]+>} $text "" text
}
regsub -all {(\\|\;|\,)} $text {\\\1} text
regsub -all \n $text {\\n} text
return $text
utc_to_clock (scripted)
clock scan $utc_time -format "%Y%m%dT%H%M%SZ" -gmt 1