I'm taking a little break from blogging this week to try get on top of my work load. To fill the gap until then here are two little functions I wrote a while back for getting the weeks in a month.
These come in useful for projects where you have to interface with reporting systems with numbered weeks in a month. They are also useful for calendar apps.
This function calculates how many weeks are in a given month.
Get the week number in a month of a given date.
Heres a quick example for testing these functions.
weeks in month: #weeksInMonth(now())#
Current Week: #weekOfMonth(now())#
Hope these come in useful. I should be back blogging next week once my work load levels off a bit (fingers crossed) :-).