[futurebasic] Re: [FB] Determine what day it is

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 2012 : Group Archive : Group : All Groups

From: Bernie <fblist.bw@...>
Date: Tue, 3 Apr 2012 16:48:59 +0100
Steve wrote:

> What is the best/preferred/non-deprecated method for determining the current day of the week?

I don't think any of these CF calls are deprecated.
'---------------
include "Tlbx CFTimeZone.incl"
include "ConsoleWindow"

dim as CFAbsoluteTime at
dim as CFTimeZoneRef tz
dim as SInt32 dow

at = fn CFAbsoluteTimeGetCurrent()
tz = fn CFTimeZoneCopySystem()
dow = fn CFAbsoluteTimeGetDayOfWeek( at, tz )
CFRelease( tz )

print "Day of week:"dow
'---------------