Determining the day of the first day of a month
Just realized my calendar code is not always displaying the day 1 of the month on the correct day.
So I went back to the date handle docs and cannot determine HOW to grab the value.
I would assume I would supply CF the month and year integers and it would provide a dayofweek?
Or not?
The method I am using now is clearly wrong. 😞
<cfset month_then=createdate("#year_then#","#monthis#", 01)>
<cfset month_starts_on_day=dayofweek(month_then)>
<cfset month_starts_on_day=month_starts_on_day-1> forget why I added this?
<cfif month_starts_on_day is 0>
<cfset month_starts_on_day=7>
</cfif>
<cfset dim=daysinmonth("#month_then#")>
<cfset dim_total=dim>
<cfset dim=dim+month_starts_on_day>
