I wrote a custom tag for myself a while back to give me the date of each day
of a given week based on only having one day. Here's part of the code to
determine Friday (the upper bound of the week for my purpose)

<CFSET BaseDate = '3/12/01'>

<CFSET BaseDateNumber = DayOfWeek(BaseDate)>
        <!--- Basdate being like 3/6/01 or whatever day you input. --->

<CFSET DaysLeftInWeek = (6 - BaseDateNumber)>
        <!--- Find out how many days until Friday. --->

<CFSET DateToAdd = Dateformat(DateAdd('D', DaysLeftInWeek ,
VARIABLES.BaseDate), "mm/dd/yy")>

<CFOUTPUT>#DateToAdd#</CFOUTPUT>

J.



John Wilker
Web Applications Consultant
Allaire Certified ColdFusion Developer

Office: 909-943-8428
www.billtracker.org <http://www.billtracker.org>


-----Original Message-----
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 5:49 PM
To: CF-Talk
Subject: week ending


I want to setup a page that displays the week ending date based on the
current week.  So that if today was 3/07/2001 it would display 3/10/2001 or
if it was the 6th it would still say the 10th but then next week it will
start with the next week ending date.  Can someone help.

Joshua Tipton
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to