<--- --------------------------------------------------------------------------------------- ---- Blog Entry: A Small Calendar Utility For Reference Author: Ben Nadel / Kinky Solutions Link: http://www.bennadel.com/index.cfm?dax=blog:429.view Date Posted: Dec 7, 2006 at 3:18 PM ---- --------------------------------------------------------------------------------------- ---> // Get the current month. REQUEST.ThisMonth = CreateDate( Year( REQUEST.Environment.DateTime.Now ), Month( REQUEST.Environment.DateTime.Now ), 1 ); // Create an array of months. REQUEST.Months = ArrayNew( 1 ); // Add a date for each month to the array. Right now, we are going // to be using one month previous to this one, plus 11 months going // forward. This should give us just over a year going forward. for (intI = -1 ; intI LTE 12 ; intI = (intI + 1)){ ArrayAppend( REQUEST.Months, DateAdd( "m", intI, REQUEST.ThisMonth ) ); }