thanks. I see now where I made my mistake On May 24, 2011, at 6:44 PM, Robert Purves wrote: > > Steve wrote: > >> Can someone provide an updated example of the changes needed in this example below, which works in FB4 but not FB5? > > > '--------------- > include "Tlbx CFDate.incl" > include "Tlbx CFTimeZone.incl" > > include "ConsoleWindow" > > local fn DayOfYearGetDate( dayNumber as SInt32, year as SInt32 ) as CFGregorianDate > '~'1 > dim as CFTimeZoneRef zone > dim as CFAbsolutetime absTime > dim as CFGregorianUnits units > dim as CFGregorianDate date > > BlockZero( @date, sizeof( date ) ) > BlockZero( @units, sizeof( units ) ) > zone = fn CFTimeZoneCopySystem() > date.year = year > absTime = fn CFGregorianDateGetAbsoluteTime( date, zone ) > units.days = dayNumber > absTime = fn CFAbsoluteTimeAddGregorianUnits( absTime, zone, units ) > date = fn CFAbsoluteTimeGetGregorianDate( absTime, zone ) > CFRelease( zone ) > end fn = date > > > dim as CFGregorianDate d > > d = fn DayOfYearGetDate( 366, 2008 ) > print d.day, d.month, d.year > '--------------- > > Robert P. > > > -- > To unsubscribe, send ANY message to: futurebasic-unsubscribe@... > To access the list archives, go to: http://freegroups.net/groups/futurebasic/ >