I wrote a tag sometime last year that does this for you. Search for
instaCalendar on the dev gallery...

----- Original Message -----
From: "Jeremy Allen" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, October 06, 2000 12:44 PM
Subject: RE: OK, Here is the code


> It looks like you went over the same thing I did
> to set up the offsets for the first week.
>
> Instead of doing the 7 comparisons to figure out
> the day of the week you can just use DayOfWeek
> which basically does it for you (See my previous
> post :)  I was going to do the same thing and
> then i figured out DayOfWeek function does
> that a ton easier.
>
> So using DayOfWeek trims the number of comparisons
> as well :)
>
> My snippet also displays how to use the DayOfWeek
> function to fill in your last few columns as well.
>
>
> Jeremy Allen
> [EMAIL PROTECTED]
>
> -----Original Message-----
> From: Kevin Schmidt [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 06, 2000 1:22 PM
> To: CF-Talk
> Subject: OK, Here is the code
>
>
> This is a multi-part message in MIME format.
>
> ------=_NextPart_000_0183_01C02F90.1397B780
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> I got more requests for the code than I thought I would so here it is.  =
> I didn't include the addupdateevent template or the eventdetail =
> template.  As always if you have any recommendations once you see the =
> code let me know.
>
> Thanks,
>
> Kevin
>
>
> <!--- Check to see if a specific date was requested or show today --->
> <CFIF IsDefined("form.showdate")>
> <CFSET DATETODISPLAY =3D #url.showdate#>
>
> <CFELSE>
> <CFSET DATETODISPLAY =3D #DateFormat(Now(), "mm/dd/yyyy")#>
> </CFIF>
>
> <!--- Set up the first day of the month requested --->
> <CFSET FIRSTDAY =3D "#DateFormat(DATETODISPLAY, =
> 'mm')#/01/#DateFormat(DATETODISPLAY, 'yyyy')#">
>
> <!--- Set what day the first day of the month is on --->
> <CFIF #DateFormat(FIRSTDAY, 'DDD')# EQ "SUN">
> <CFSET LOOPSTART =3D 6>
> </CFIF>
>
> <CFIF #DateFormat(FIRSTDAY, 'DDD')# EQ "MON">
> <CFSET LOOPSTART =3D 0>
> </CFIF>
>
> <CFIF #DateFormat(FIRSTDAY, 'DDD')# EQ "TUE">
> <CFSET LOOPSTART =3D 1>
> </CFIF>
>
> <CFIF #DateFormat(FIRSTDAY, 'DDD')# EQ "WED">
> <CFSET LOOPSTART =3D 2>
> </CFIF>
>
> <CFIF #DateFormat(FIRSTDAY, 'DDD')# EQ "THU">
> <CFSET LOOPSTART =3D 3>
> </CFIF>
>
> <CFIF #DateFormat(FIRSTDAY, 'DDD')# EQ "FRI">
> <CFSET LOOPSTART =3D 4>
> </CFIF>
>
> <CFIF #DateFormat(FIRSTDAY, 'DDD')# EQ "SAT">
> <CFSET LOOPSTART =3D 5>
> </CFIF>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
>

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to