applescript semantics for an applescript newbie

i am having some trouble with scripting iCal. consider this repeat block within a script where “BirthdayEvents” is just a non-empty list of events inside a particular iCal calendar:

repeat with TheEvent in BirthdayEvents
set TheEventDate to start date of TheEvent
set TheEventTime to time of TheEventDate
if (TheEventTime = 0) then move TheEvent to after events of calendar "FooBirthdays"
--if ((time of (start date of TheEvent)) = 0) then move TheEvent to after events of calendar "FooBirthdays"
end repeat

there are four lines within the repeat block. as written (with the last line commented and the other three uncommented), the code block works fine. however, when i uncomment the last line and comment the first three lines (which i would have thought would be semantically equivalent), the code block no longer works.

the last lines of the event log are as follows:

can anyone clarify as to why this one-line version doesn’t work while the three-line version does? thanks!

Hi,

unfortunately there is no global solution for these cases, in this case just add get

tell application "iCal"
	repeat with TheEvent in BirthdayEvents
		if ((time of (get start date of TheEvent)) = 0) then move TheEvent to after events of calendar "FooBirthdays"
	end repeat
end tell