Getting Week, Month, And Year Dates Based On A Given Date In ColdFusion

<!---
	The calendar display dates are ever slightly more
	complicated. It helps to work off of the previously
	calculated month start/end dates to make them easier
	to work with.
--->
<cfset dtCalendarMonthStart = (
	dtMonthStart - DayOfWeek( dtMonthStart ) + 1
	) />
 
<!--- Get the end date. --->
<cfset dtCalendarMonthEnd = (
	dtMonthEnd + (7 - DayOfWeek( dtMonthEnd ))
	) />
 
 
<!--- Output the dates: --->
Today: #DateFormat( dtToday )#<br />
Cal. Month Start: #DateFormat( dtCalendarMonthStart )#<br />
Cal. Month End: #DateFormat( dtCalendarMonthEnd )#<br />

For Cut-and-Paste