Oops, forgot startMonth:
<cfset startMonth="3">
<cfset startYear="2003">
<cfoutput>
<cfloop from="#startYear#" to="#datePart("yyyy", now())#" index="currentYear">
<cfloop from="#iif(currentYear neq startyear, "1", "startMonth")#"
to="#iif(currentYear neq datePart("yyyy", now()), "12", "datePart('m',
now())")#" index="currentMonth">
#monthAsString(currentMonth)# #currentYear#<br>
</cfloop>
</cfloop>
</cfoutput>
On Mon, 9 Aug 2004 10:19:07 -0400, Joe Rinehart <[EMAIL PROTECTED]> wrote:
> Hey John,
>
> Here ya go:
>
> <cfset startMonth="3">
> <cfset startYear="2003">
>
> <cfoutput>
> <cfloop from="#startYear#" to="#datePart("yyyy", now())#" index="currentYear">
> <cfloop from="1" to="#iif(currentYear neq datePart("yyyy", now()),
> "12", "datePart('m', now())")#" index="currentMonth">
> #monthAsString(currentMonth)# #currentYear#<br>
> </cfloop>
> </cfloop>
> </cfoutput>
>
--
For Tabs, Trees, and more, use the jComponents:
http://clearsoftware.net/clear/?template=downloads.jComponents
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- looping over dates? John Beynon
- Re: looping over dates? Massimo Foti
- Re: looping over dates? Joe Rinehart
- RE: looping over dates? Joe Rinehart
- RE: looping over dates? Tangorre, Michael
- Re: looping over dates? John Beynon
- RE: looping over dates? d.a.collie
- Re: looping over dates? John Beynon
- Re: looping over dates? Joe Rinehart