can you tell I was bored??

-------------------------------------------
<cfscript>
        startDate = "01/01/02";

        theDay = dayOfWeek(startDate);
        firstMonday = 8 - (theDay - 2);
        daysInYear = daysInYear(startDate) - 7; // this ensures that the
first week of the next year doesn't display

        startDate = dateFormat("01/#firstMonday#/02","mmm d, yyyy");
</cfscript>

<cfoutput>
#startDate#<br>
<cfloop from="#firstMonday#" to="#daysInYear#" step="7" index="i">
        #dateFormat(dateAdd("d",i,startDate),"mmm d, yyyy")#<br>
</cfloop>
</cfoutput>
------------------------------------------

want multiple years?  Put the whole thing in a loop.


+-----------------------------------------------+
Bryan Love
  Macromedia Certified Professional
  Internet Application Developer
  Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+

"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
        - Thomas Paine, The American Crisis



-----Original Message-----
From: Jon Martin [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 29, 2002 3:56 PM
To: CF-Talk
Subject: Week numbers and dates


HI All,

Any suggestions on how to return/ generate the weeks
of the year staring on Mondays.

IE week 1 = Dec 31 01
week 2 = jan 7 02
week 3 = jan 14 02

ETC...

Thanks

JON

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to