[futurebasic] Re: [FB] Day of the week routine

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 1999 : Group Archive : Group : All Groups

From: Joe Lewis Wilkins <PepeToo@...>
Date: Fri, 15 Oct 1999 18:58:13 -0700
Ooops! Didn't read all of the prolog:

Parameters apparently need to be (3,18,1999) instead of (3,18,99) as I indicated.

Joe Wilkins

Warren Furman wrote:

> Hi all,
>
> I discovered this goodie, which could be useful to many of us, amongst the
> FB archives. It appears to be exactly what I'm looking for, but I can't
> find the key to extracting the day. Clues, anyone?
>
> Thanks,
>  -Warren
>
> '===========================================================
> ' dayofweek - Calculate day of the week index
> ' At entry dd=date, mm=month, yy=year in format nnnn e.g. 1991
> ' this date should first be validated
> ' At exit z=index to day of the week (1=Sunday, 7=Saturday)
> ' routine valid for dates 1-1-1583 through 12-31-9999
>
> 'Subj: Re:Day of Week Clarification
> 'Date: 96-03-15 18:18:44 EST
> 'From: WatsonR
>
> '===========================================================
> LOCAL FN DayOfWeek(mm,dd,yy)
>   t!=1/mm
>   k1=0.6+t! : l1=yy-k1
>   t!=12*k1
>   o1!=mm+t! : p1#=l1/100
>   z1=INT(p1#/4) : z2=INT(p1#) : z3=INT((5*l1)/4)
>   z4=INT(13*(o1!+1)/5) : z=z4+z3-z2+z1+dd
>   z=z-(7*INT(z/7))
> END FN=z
> '----------
>
> Best wishes,
> -Warren Furman
>
> ********************************************************************************
> Music and Art: http://members.xoom.com/_XOOM/maci_us/index.html
> Software: colorWiz/Alphie/MacMinder: http://wrf-digitals.hypermart.net/
> More music: http://mp3.com/artists/25/warren_furman.html
> ********************************************************************************
>
> --
> To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>